Sign in to follow this  
jagot

OpenGL extensions avaiable?

Recommended Posts

Hello! I've recently started to look into OpenGL extensions, and started using GLee. I found a nice extension, EXT_texture3D containing the nice functions glTexSubImage{123}D I'd like to use the 2D one to update a texture dynamically, and after querying GLee, like this:
printf("%i\n", GL_EXT_texture3D);
it reports '1', while 'GL_EXT_texture3D' is not present when looking here:
printf("\nThese are the extensions avaiable on your system:\n%s\n\n",
  (char*) glGetString(GL_EXTENSIONS));
The extension EXT_texture3D was promoted to the core in OpenGL 1.2, and running this snippet
printf("OpenGL version: ");
if(GLEE_VERSION_1_2){
	if(GLEE_VERSION_1_3){
		if(GLEE_VERSION_1_4){
			if(GLEE_VERSION_1_5){
				if(GLEE_VERSION_2_0){
					printf("2.0");
				}
				else{
					printf("1.5");
				}
			}
			else{
				printf("1.4");
			}
		}
		else{
			printf("1.3");
		}
	}
	else{
		printf("1.2");
	}
}
else{
	printf("1.1");
}
printf("\n");
returns 'OpenGL 1.5'. On the backside my card was shipped in it's stated that the card fully supports OpenGL 1.3. Does that mean that the extension is available due to the OpenGL version being high enough and the ones gotten from (char*) glGetString(GL_EXTENSIONS) are those not promoted to the core yet (or promoted to the OpenGL 2.0 core) but supported by my card? Jagot

Share this post


Link to post
Share on other sites
glTexSubImage2D() is part of version 1.1, so you can use it on Windows without any hassle.

Share this post


Link to post
Share on other sites
To query GLee, you have to use GLEE_EXT_texture3D, not GL_EXT_texture3D. If GL_EXT_texture3D isn't in your GL_EXTENSIONS string then GLee won't report it either.

Quote:

returns 'OpenGL 1.5'. On the backside my card was shipped in it's stated that the card fully supports OpenGL 1.3. Does that mean that the extension is available due to the OpenGL version being high enough and the ones gotten from (char*) glGetString(GL_EXTENSIONS) are those not promoted to the core yet (or promoted to the OpenGL 2.0 core) but supported by my card?


The GL version specifies which core functions you have available. It doesn't specify which extensions you have access to.

Share this post


Link to post
Share on other sites
Well, but if the core version > core version required, is a former extension not considered extension anymore? I.e. are all those extension reported by
glGetString(GL_EXTENSIONS);
extensions above the OpenGL version my card supports? If my card reports "OpenGL 1.5", does that mean that OpenGL 1.5 and everything below is fully supported?

Don't want to make a fuss, but I want to get things right. When releasing an application it's nice to be sure of how functions behave so one at least can predict most of the apps behaviour on different machines.

Jagot

Share this post


Link to post
Share on other sites
Quote:
Original post by jagot
Well, but if the core version > core version required, is a former extension not considered extension anymore? I.e. are all those extension reported by
glGetString(GL_EXTENSIONS);
extensions above the OpenGL version my card supports?

Promoted extensions are still extensions. The functionality are accessible in two ways; the core and the extension. An implementation can decide to drop the support for a particular extension when it's moved into the core, but doing so isn't very clever.

Say you use extension GL_ARB_whatever and it's function glWhateverARB. You application use this function, and works well. Now the implementation is upgraded with a new version of OpenGL, which includes this extension in the core and the implementation decided to not expose the extension anymore. Your application will fail, becuase the function is now called glWhatever (extension postfixes are dropped when moved into the core, changing the name of the function), and you cannot find the correct function anymore.

But note that as some extensions are moved into the core, their behaviour could change. So you unless you have read the extension specification and the core specification, you shouldn't rely on glWhateverARB and glWhatever to to exactly the same thing. There can be some minor difference.

Quote:
Original post by jagot
If my card reports "OpenGL 1.5", does that mean that OpenGL 1.5 and everything below is fully supported?

Everything up to and including OpenGL 1.5 must be supported if the driver claims to support OpenGL 1.5. Nothing can be ingored.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this