• Advertisement
Sign in to follow this  

Any way Render to VBO directly?

This topic is 2010 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK?I know it is possiable to "Render to Texture " or "Render to PBO" and the throw the data to VBO..
But some topics on web told that maybe Render to VBO is the best way ..
Any one can tell how to do with it ?

Share this post


Link to post
Share on other sites
Advertisement
I'm not the most experienced with this feature, but from what I know:
* You'll find some information by searching for "R2VB" (render to vertex buffer), but AFAIK, R2VB is only possible on certain, old (DX9/GL2?), AMD GPUs.
* On DX10(GL3?) GPUs, you should be able to tell the vertex shader to "stream out" (aka "transform feedback") the transformed vertices to a VBO, instead of rasterising them as triangles/primitives.
* On modern GPUs (DX11/GL4?) there might be a way to render to a texture, but then bind that texture resource as if it were a VBO ([i]i.e. the same GPU memory allocation can be bound as a writeable texel buffer and as a readable vertex buffer[/i]), much like R2VB does. Edited by Hodgman

Share this post


Link to post
Share on other sites
You'll need to look up a feature called "Transform Feedback" in OpenGL. You can disable polygon rasterization and have the output of a vertex shader stored directly in a VBO. This feature was enabled at least as early as 3.3 Edited by Koehler

Share this post


Link to post
Share on other sites
I have a transform feedback example in my examples: https://github.com/progschj/OpenGL-Examples/blob/master/09transform_feedback.cpp

Share this post


Link to post
Share on other sites
Sorry for saying thanks so late..
Thanks to all of you ,I will try as you've said ..

I will show the right when it's OK.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement