What should I do to upload large vertex meshes to the GPU without blocking host program and the rendering context?
My program generates a 3D heightmap from grayscale images several times per second. There are two bottlenecks: the analysis of the image and generation of the vertices/normals, and compiling the data as a display list and uploading it to the GPU.
- create a second thread for processing the data and a shared rendering context for uploading the vertices w/o blocking the primary context?
- replace the display list by a VBO?
- upload the image to the GPU and let it create the vertices and normals (is this possible with a geometry shader)?
What would you do?