I have a live stream of data from which I’m extracting a 512x512 grid of (x, y, z) points at real-time video rates (~25 fps). (I actually have three such streams but I’ll stick to one for now).
I’ve written some code to do the rendering (I’ll post it here if anyone asks) but it’s not fast enough. I’ve tried using vertex arrays and vertex buffer objects using both glBufferData and glMapBuffer but trying to render the data in real-time is causing my whole application to slow down.
It works well if I sub-sample to 256x256 but I’d rather not do this, as it it means I can’t display as much detail as I’d like.
Does anyone have any tips on how I can speed up my rendering?
Yes, I’m currently using a single VBO. So would you recommend splitting the mesh (vertices, colours, normals, tcoords etc) over a number of vbos, or would you use a vbo for vertices, another for normals etc?
Do you know if there are any code examples using multiple vbos?
If the content is streamed like video and you know ‘frames’ in advance, then you can and should buffer ahead like this. If your content is updated in some interactive manner, buffering more will add latency.
Thanks for your suggestions. The data I am displaying is a live video stream. I’m displaying a surface extracted from the video using fourier fringe analysis, so I don’t know any frames in advance. I’ll give your suggestions a go and post the results when I’m done.