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

geometry shaders, etc

Started by Quat Apr 8, 2007 at 11:44 PM 5 replies 1.2k views
Original Post
Quat
Quat
Hi, Direct3D 10 has geometry shaders. My question is: does nvidia provide extensions for using this functionality with opengl? Will they eventually? Does that mean stuff like geometry shaders will be available on Windows XP via OpenGL at some point in the future?
-----Quat
Quat
Quat
Thanks for that. I'm considering trying out GL from D3D for fun, but am a little confused how the extensions work. Are extensions specific to a card? For example, when ATI releases their geometry shader card, would I have to write code specific to each card? Or, for example, can I just query for geometry shader support?

Side Note: Does OpenGL have lost devices like D3D does? I.e., do you ever have to recreate opengl vertex buffers, etc, due to a lost device?
-----Quat
nagromo
nagromo
Extensions can be (but aren't always) supported by mutliple cards/companies. Extensions that are NVidia-specific start with NV_ and ones that are ATI specific start with ATI_. Generic ones that should be supported on all cards that are new enough start with EXT_ or ARB_ (ARB being more standardized).

For example, NVidia has both EXT_geometry_shader4 and NV_geometry_shader4. If you want your code to work on both ATI and NVidia without extra work, you should use EXT_geometry_shader4. ARB_vertex_shader and ARB_fragment_shader are for cross-card vertex and pixel shaders.

You can write multiple code paths if you want to, but that's usually done to support different quality settings, I.E. 'low quality' for simple implementation that will work on very old cards to 'ultra quality' that will use the newest and shiniest features, only on the newest and shiniest cards.

[edit] Fixed old info (Thanks, Yann L)

[Edited by - nagromo on April 9, 2007 4:24:27 PM]
rollo
rollo
Quote:
Original post by Quat
Side Note: Does OpenGL have lost devices like D3D does? I.e., do you ever have to recreate opengl vertex buffers, etc, due to a lost device?


No, no lost devices, although I think there is a possibility memory could be corrupted on vertex buffers if you map them to memory with glMapBuffer for updates (rather than just copying/writing over parts of them), but my memories on when/why this actually can happen are hazy, take a peek at the spec if you are interested.
MARS_999
MARS_999
Quote:
Original post by Quat
Thanks for that. I'm considering trying out GL from D3D for fun, but am a little confused how the extensions work. Are extensions specific to a card? For example, when ATI releases their geometry shader card, would I have to write code specific to each card? Or, for example, can I just query for geometry shader support?

Side Note: Does OpenGL have lost devices like D3D does? I.e., do you ever have to recreate opengl vertex buffers, etc, due to a lost device?


Not unless you decide to destroy the rendering context and setup again. But I think you are asking things like ALT-TAB, no your data will be just fine...
Yann L
Yann L
Quote:
Original post by nagromo
ARB_vertex_program and ARB_fragment_program are for cross-card vertex and pixel shaders.

Small correction: it's ARB_vertex_shader and ARB_fragment_shader. The *_program variants are the old, obsolete ASM interfaces, and shouldn't be used anymore.

Topic Locked

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

Sign in to reply to this topic.