Skip to main content
GameDev.net gamedev.net
🔒 Locked

Render to Vertex Buffer

Started by 51mon Feb 28, 2007 at 4:39 AM 2 replies 1.1k views
Original Post
51mon
51mon
I’m a notorious DirectX user, I don’t mind OpenGL but I just don’t know it very well :) Anyhow I’m a bit curious of OpenGL’s render to vertex buffer capabilities. How do you use it? How does it work? How many bits can you write too at the same time? Are there any limitations of the total number of rendered vertex buffers? Do you need to use any extensions? Does it work on NVIDIA cards? In DirectX there is a feature called R2VB which only works with ATI-cards. You can only render to 4 channels per vertex buffer and have a maximum of 5 vertex buffers totally. I just want to get a grasp of how it’s working, so if anybody could explain or give me a link to some easy reading (where you don’t have to be an OpenGL expert) I would be thrilled :) Thanks
Centurion
Centurion
http://www.opengl.org/registry/specs/ARB/vertex_buffer_object.txt

P.S. Found in 30 seconds))))
Yann L
Yann L
Quote:
Original post by Centurion
http://www.opengl.org/registry/specs/ARB/vertex_buffer_object.txt

P.S. Found in 30 seconds))))

Yeah, maybe found in 30 secs, but unfortunately completely irrelevant to the question.

51mon: R2VB is pretty much an ATI only feature. NVidia prefers texture accesses in vertex shaders, which can implement pretty much the same features as R2VB, and a lot more on top of that. But ATI do not support this functionality, so they promoted R2VB instead. The usefulness of this feature compared to vertex texture access is open to debate.

Anyway, OpenGL doesn't really have a completely vendor independent way to do actual R2VB. It does have a similar feature though, which can be invoked through the pixel buffer object (PBO) extension. This version of R2VB will work on all cards (including Nvidia), and doesn't have any specific limitations on the number of attribute streams you write. Unfortunately, it will invoke an internal data copy, so it's not real R2VB. The copy is local to VRAM, so it's pretty fast though.

Of course, you can still use vertex texture access instead. It's a built-in feature of GLSL. But AFAIK this will (currently) only work on Nvidia cards.
51mon
51mon
Quote:
Original post by Yann L
Quote:
Original post by Centurion
http://www.opengl.org/registry/specs/ARB/vertex_buffer_object.txt

P.S. Found in 30 seconds))))

Yeah, maybe found in 30 secs, but unfortunately completely irrelevant to the question.

51mon: R2VB is pretty much an ATI only feature. NVidia prefers texture accesses in vertex shaders, which can implement pretty much the same features as R2VB, and a lot more on top of that. But ATI do not support this functionality, so they promoted R2VB instead. The usefulness of this feature compared to vertex texture access is open to debate.

Anyway, OpenGL doesn't really have a completely vendor independent way to do actual R2VB. It does have a similar feature though, which can be invoked through the pixel buffer object (PBO) extension. This version of R2VB will work on all cards (including Nvidia), and doesn't have any specific limitations on the number of attribute streams you write. Unfortunately, it will invoke an internal data copy, so it's not real R2VB. The copy is local to VRAM, so it's pretty fast though.

Of course, you can still use vertex texture access instead. It's a built-in feature of GLSL. But AFAIK this will (currently) only work on Nvidia cards.


Thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.