OpenGL Compatibility verification

Started by
1 comment, last by V-man 12 years, 5 months ago
Hi,

I have two questions:

1. How can I find the minimum OpenGL versionrequired to run my app?

Is there any utility that can intercept all thegl calls while my app is running, and log the minimum required OpenGL versionfor each call? For example:





Function | OpenGL version required



glBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) | 1.5

glEnable(GL_SCISSOR_TEST) | 1.3



2. Is there any way I could tell my OpenGL 3.3card to "behave" like, say, an 1.3 card? That is, how can I"downgrade" my OpenGL support in my card? This is for testingcompatibility, of course.





Thanks,

Gil.
Advertisement
There are no automated tools as far as I know. But you can download the API specifications and see when something was added to the core API. You don't have to read through the specifications, but at the end you'll find what extensions was added to some version of the API, and from there you can figure out the minimum version based on what you use.

You need to look at the 2.1 specification for the pre-3.0 API, since the post-3.0 specifications do not show a pre-3.0 feature list.

But keep in mind though that this will only tell you the lowest core version you use. Your program may very likely still run without problems even with a lower core version if the correct extensions are supported. It is easy to tell which version you support, but it says nothing if the program will run correctly or not on computers that does not have drivers of that version installed.

As for downgrading, I'm not aware of any such drivers either, if you want to downgrade to a specific version. You can typically downgrade from 3.3 to pre-3.0 though by not creating a forward compatible rendering context. But you can not chose which particular version.
There is no such thing as downgrading in OpenGL. OpenGL is always backwards compatible all the way down to GL 1.0.
The only thing that changes that backwards compatibility thing is the "forward compatible context" extension that came along with the introduction of GL 3.0.

I'm not aware of any tools that can check your code and figure out which GL version it requires, although it is possible to make one.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement