Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Any way Render to VBO directly?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 FireInDark   Members   

148
Like
0Likes
Like

Posted 17 July 2012 - 11:58 PM

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 ?

#2 Hodgman   Moderators   

50614
Like
1Likes
Like

Posted 18 July 2012 - 12:47 AM

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.e. the same GPU memory allocation can be bound as a writeable texel buffer and as a readable vertex buffer), much like R2VB does.

Edited by Hodgman, 18 July 2012 - 12:53 AM.


#3 Koehler   Members   

228
Like
1Likes
Like

Posted 19 July 2012 - 09:11 AM

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, 19 July 2012 - 09:14 AM.


#4 japro   Members   

887
Like
1Likes
Like

Posted 19 July 2012 - 09:15 AM

I have a transform feedback example in my examples: https://github.com/progschj/OpenGL-Examples/blob/master/09transform_feedback.cpp

#5 FireInDark   Members   

148
Like
1Likes
Like

Posted 20 July 2012 - 01:45 AM

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.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.