View Full Version : Minimum requirements: extensions support
05-08-2006, 02:51 AM
I have two questions regarding OpenGL extensions:
1) Let's say I'm developing a piece of software that uses some more or less advanced OpenGL features. Is there a way to find out exactly what GL extensions my software requires to run? Some analysing tool? Empirical testing is not possible since it will be run on many different systems.
2) To make it easy, I could say that it requires OpenGL 2.0. Saying that, is there a site / document that clearly states what features / extensions that are covered by OpenGL 2.0?
Thanks in advance!
1: You should know if you use an extension or not really. You know you use an extension if you use function names or constants that ends with some of the extension postfixes (ARB, EXT, NV, ATI for example).
I don't know of anything to automatically detect this when you've already writtent the program. But on the other hand, if you search for the usual extension postfixes to see what symbols you use, you can always look up the symbol in glext.h. They are sorted by extension in there, so you will easily find which extension they belong to.
2: That would be the API specification. Clicky (http://www.opengl.org/documentation/specs/) .
05-08-2006, 03:01 AM
I am really sorry, but your question IS funny
a) it uses the extensions you use in your code
b) the specification?
05-08-2006, 03:34 AM
Ok, It's a funny question. I know the extensions that I use explicitly, but for 3rd party components they don't always specify the requirements (not detailed enough). Actually in this case there is no problem since the source code is provided, but in general it would be 'nice' with some kind of analysing tool.
For the 2.0 specification, I see the chapter now. Thanks. Sorry, the spec can be a bit overwhelming sometimes.
Now that we're on it... a good 3rd question would be:
3) Is there a site / doc where I can see what version of OpenGL is supported by a certain graphics adapter/driver?
Thank you for the fast reply. It's beyond my expectations.
05-08-2006, 03:49 AM
Sorry, I'm asking too early. The answer to my question 3 is here: http://www.delphi3d.net/hardware/listreports.php
05-08-2006, 06:48 AM
This bit of code i plucked fron one of the NeHe tutorials will alow you to check if the current system supports a given extension.
// checks if a extentionn is supported, we need to do this since not all harware or drivers support this
bool IsExtensionSupported( char* szTargetExtension )
const unsigned char *pszExtensions = NULL;
const unsigned char *pszStart;
unsigned char *pszWhere, *pszTerminator;
// Extension names should not have spaces
pszWhere = (unsigned char *) strchr( szTargetExtension, ' ' );
if( pszWhere &#0124;&#0124; *szTargetExtension == '\0' )
// Get Extensions String
pszExtensions = glGetString( GL_EXTENSIONS );
// Search The Extensions String For An Exact Copy
pszStart = pszExtensions;
pszWhere = (unsigned char *) strstr( (const char *) pszStart, szTargetExtension );
if( !pszWhere )
pszTerminator = pszWhere + strlen( szTargetExtension );
if( pszWhere == pszStart &#0124;&#0124; *( pszWhere - 1 ) == ' ' )
if( *pszTerminator == ' ' &#0124;&#0124; *pszTerminator == '\0' )
pszStart = pszTerminator;
05-08-2006, 10:34 PM
In response to question 1, you can "kindof" find what OpenGL extensions are used via GLIntercept. ( http://glintercept.nutty.org/ )
Simply use the "XMLFrame" profile (or just turn logging off) and add:
FunctionStats = ("GLFuncStats\GLFuncStats.dll");
To the "Plugins" section of the gliConfig.ini file.
Then, after you have run your program with GLIntercept, you will get a summary in the gliLog.txt file of all OpenGL calls made and how many times it was called.
From this you can see what extensions are being used.
NOTE: If the extension being used does not involve any entry points, this will obviously not find it.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.