Jump to content
  • Advertisement
Sign in to follow this  
Quat

OpenGL geometry shaders, etc

This topic is 4267 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

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?

Share this post


Link to post
Share on other sites
Advertisement
Yes, Nvidia already provides OpenGL extensions for geometry shaders and a lot of other GF8 capabilities, and they're available under XP. See the extensions specs here:

http://developer.nvidia.com/object/nvidia_opengl_specs.html

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!