AstroBistro
06-17-2010, 06:35 AM
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.
Should I
- 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?
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.
Should I
- 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?