foxostro / GutsyStormPython_Abandoned

Python game with boxy voxel terrain. (similar to Minecraft's terrain)
GNU General Public License v3.0
1 stars 0 forks source link

VBO creation impacts frame rate too much. Move code to Objective-C. #18

Open foxostro opened 12 years ago

foxostro commented 12 years ago

Creating and uploading VBOs for new chunks has a high impact on the frame rate. This causes the frame rate to drop unacceptably low when the camera views new chunks for the first time.

Move geometry generation off the main thread: When a terrain load/generate process finishes and calls back into the main process, spawn off a task on a thread so as to create and fill the VBO asynchronously. It will probably be necessary for this work to be done in Objective-C code so we can specifically avoid holding the GIL. It will still be necessary to lock access to the OpenGL as the API is not designed for concurrency. (At least, we can process input and do other updates while uploading VBO data.)