🔒 Locked
OpenGL vertex data
Advertisement
Original Post
In Direct3D we have a thing called an index buffer which is used with a vertex buffer, equivalent to one of your OpenGL display lists, to store indexed primitives in video memory. I''m sure you could find an OpenGL equivalent.
Please state the nature of the debugging emergency.
Please state the nature of the debugging emergency.
As zedzeek mentioned in the first reply, nvidia has a set of extensions for creating video-memory vertex buffers. There''s a wgl binding called wglAllocateMemoryNV that returns a pointer to video memory.
Just don''t treat this like standard read-write memory, or you''ll kill your performance! From what I''ve read, the best way to use this memory is to update all the vertices at once (use local temp vars for calculating). The primary advantage in-memory vertex buffers is that they can be pre-transformed, saving time if you reuse the vertices a lot.
If you''re vertices aren''t changing, by all means use display lists instead. It doesn''t matter how you create them (per-vertex calls, index primitives, etc..) because they''re stored in video-memory anyways. They have no overhead associated with sending vertex data across the bus.
More than you needed, probably, but there seemed to be some confusion out there regarding these subjects.
Morbo
Just don''t treat this like standard read-write memory, or you''ll kill your performance! From what I''ve read, the best way to use this memory is to update all the vertices at once (use local temp vars for calculating). The primary advantage in-memory vertex buffers is that they can be pre-transformed, saving time if you reuse the vertices a lot.
If you''re vertices aren''t changing, by all means use display lists instead. It doesn''t matter how you create them (per-vertex calls, index primitives, etc..) because they''re stored in video-memory anyways. They have no overhead associated with sending vertex data across the bus.
More than you needed, probably, but there seemed to be some confusion out there regarding these subjects.
Morbo
So a display list is more like an EXECUTE BUFFER? [furby100 gasps]
Please state the nature of the debugging emergency.
Please state the nature of the debugging emergency.
not at all.
AFAIK there is no equivilant d3d method.
display lists are compiled so they execute very quickly (in theory they should execute the quickest) but on the downside if u change the data u have to recompile them.
other methods are slower but more flexible
http://members.xoom.com/myBollux
AFAIK there is no equivilant d3d method.
display lists are compiled so they execute very quickly (in theory they should execute the quickest) but on the downside if u change the data u have to recompile them.
other methods are slower but more flexible
http://members.xoom.com/myBollux
Yeah, ZZ's right. But you could call display lists analogous to execute buffers, in that you can store vertex, texture and normal information in them. Whereas D3D lets you put certain state info into execute buffers, OpenGL lets you put ANY/ALL state changes into display lists (thats any of the OGL state machines states - nice abstraction really
)...
Paul.
Edited by - Pauly on November 26, 2000 9:11:21 PM
Paul.
Edited by - Pauly on November 26, 2000 9:11:21 PM
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement