Jump to content
  • Advertisement
Sign in to follow this  
LHLaurini

OpenGL Is there something equivalent to FEATURE_LEVEL in OpenGL?

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

Good afternoon.

 

I'm writing my own engine in Direct3D, but recently I was thinking of using OpenGL. Because my laptop's GPU only supports Direct3D 10.1 and OpenGL 3.1 (hardware), I was using Direct3D 11 (software) with D3D_FEATURE_LEVEL_10_1. So I'm wondering if there's something equivalent to feature levels in OpenGL.

 

I'm sorry for my bad English.

Thanks for reading.

Share this post


Link to post
Share on other sites
Advertisement

The OpenGL version available is basically the equivalent. Extensions also allow more granular checking and partial support of higher versions, but basically an OpenGL version guarantees a certain level of support.

Share this post


Link to post
Share on other sites


The OpenGL version available is basically the equivalent.

 

So, if I compile it for OpenGL 4.0 there's no way I can run it on a OpenGL 3.0 GPU?

Share this post


Link to post
Share on other sites


So, if I compile it for OpenGL 4.0 there's no way I can run it on a OpenGL 3.0 GPU?

It's not a matter of compiling for different versions, it's a matter of only using the functions that were available in a given version.

 

As long as you use only functions available in OpenGL 3.0, your program will run on all versions 3.0 and above.

 


but basically an OpenGL version guarantees a certain level of support

It is worth providing the caveat that it doesn't necessarily suggest anything about the relative performance of the features introduced by a particular version. Bleeding-edge functionality may be present in a particular GPU/driver combination, but implemented sub-optimally (or even emulated in software).

Share this post


Link to post
Share on other sites


It is worth providing the caveat that it doesn't necessarily suggest anything about the relative performance of the features introduced by a particular version. Bleeding-edge functionality may be present in a particular GPU/driver combination, but implemented sub-optimally (or even emulated in software).

Sure, but that's descriptive of D3D 11 feature levels as well.

Share this post


Link to post
Share on other sites

Yes it is possible, but this feature is platform specific. See glx on linux and wgl on Windows. basically what you need to to is to specify GLX_/WGL/GL_MAJOR/MINOR version values while creating the context.

Share this post


Link to post
Share on other sites

I would hope people use something like GLFW to create the OpenGL context, then some other library like GLEW to load the function pointers, to avoid the platform specific quirks.

Share this post


Link to post
Share on other sites
If you can create a gl 3.3 context then you can safely assume your card has FL10.
If you can create a gl 4.X context then you can safely assume your card has FL 11.

For FL point release it's more fuzzy, for instance you rely on extension to access 11.3 FL like conservative rasterization.
I have no idea about how stencil masked msaa rendering is supported, it's likely an extension.

Share this post


Link to post
Share on other sites

Thanks everyone for your answers.

 

Also:


If you can create a gl 3.3 context then you can safely assume your card has FL10.
If you can create a gl 4.X context then you can safely assume your card has FL 11.

My GPU has support for FEATURE_LEVEL_10_1 in Direct3D but only 3.1 in OpenGL.

Share this post


Link to post
Share on other sites

Thanks everyone for your answers.

 

Also:

 

 


If you can create a gl 3.3 context then you can safely assume your card has FL10.
If you can create a gl 4.X context then you can safely assume your card has FL 11.

My GPU has support for FEATURE_LEVEL_10_1 in Direct3D but only 3.1 in OpenGL.

 

Have you updated your videocard drivers?  That might explain it, just a wild guess.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!