Is there something equivalent to FEATURE_LEVEL in OpenGL?

Started by
10 comments, last by vlj 9 years ago

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.

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.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.


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?


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).

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


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.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

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.

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.

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.

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.

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.

-potential energy is easily made kinetic-

This topic is closed to new replies.

Advertisement