Last Ray of Hope Home of Kaluriel Hargrove

28May/09Off

Athena: OpenGL 3.0 Upgrade in Progress…

Problems with glBind*()

The first one that popped up was glBindTexture(). For ages I searched the internet to try and find what had replaced this deprecated function, since I thought it might have changed to a more shader resource like system that DirectX10 uses.

Eventually I got to the point where I was reading the spec for OpenGL 3.0, and I found that glBindTexture() was in there, but not declared deprecated. However, one thing that was mentioned was that the id parameter of the call had to be a valid id generated by OpenGL, not an application. Which I determine was being caused by glBindTexture( GL_TEXTURE0, 0 );

The same thing was happening for glBindBuffer() as well, so I simply just removed all calls that removed a bound object by passing an invalid id.

I was worried that this could have bad side effects if an object was still bound when I deleted it, but after reading the spec for BindTexture and BindBuffer, I found that it is unbound when glDeleteTextures() or glDeleteBuffers() is called.

Deprecated: GL_CLAMP

This one was easy, I think I found it on my first google search, just replace it with GL_CLAMP_TO_EDGE.

//glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
 
//glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );

 

To be continued...

Apart from lots of glEnable() and glDisable() calls that had to be removed, that is all so far. There is still a ton of other things to change and research, such as lighting and shaders.

OpenGL 3.0 does seem to have gone in a positive direction, but its still not object orientated, or namespacing. Namespace would be great, especially for vendor specific calls. I'd imagine objective-c++ would work really well for OpenGL due to its runtime dynamic linking.

Tagged as: , , Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.