PDA

View Full Version : how to get rid of GL_ARB_compatibility



jmfairlie
04-11-2010, 02:38 PM
I was confused when I read that in 3.1 they got rid of the fixed pipeline but at the same time my fixed pipeline code worked flawlessly with my 3.2 driver.
I just found out it is because this GL_ARB_compatibility extension being 'enabled' by default.

Since I'm trying to learn how to use shaders and in general the new specification, I was wondering if there is any way to 'disable' this compatibility extension.

Alfonse Reinheart
04-11-2010, 03:13 PM
If you are creating a 3.2 context with ARB_context_create, then you should use the CORE_PROFILE parameter.

jmfairlie
04-12-2010, 06:15 AM
Sorry I forgot to mention I'm using SDL 1.2, and I'm not creating the context myself (I don't even know what a context is really...), so it seems SDL is taking care of that.

I found the following paragraph on the red book:

With Version 3.0, a new type of context was created—the forward-compatible context—which hides the features marked for future removal from the OpenGL API to help application developers modify their applications to accommodate future versions of OpenGL.
Also this comment from gamedev.net:

For X-windows read up on new context creation at http://www.opengl.org/registry/specs/ARB/glx_create_context.txt

For MS-Windows read up on it at: http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt

if you use another library to create your contexts for you, then be prepared to hack them some, there is also a thread at opengl.org's forum on creating 3.0 contexts, if you use SDL, SDL 1.3 in SVN does GL 3.x, and their is also a patch for SDL 1.2 on the mailing lists.

nVidia's driver creates a 3.0 context which includes the "ARB_compatibility" extension, which is basically backwards compatibility for deprecated GL calls, to get a GL context without that stuff, you need to create your context with the named extensions above.


These are the instructions mentioned above on how to setup a 3.x context with SDL 1.3:

http://www.opengl.org/wiki/Tutorial1:_Cr...L_%28C_/_SDL%29 (http://www.opengl.org/wiki/Tutorial1:_Creating_a_Cross_Platform_OpenGL_3.2_Co ntext_in_SDL_%28C_/_SDL%29)

Although SDL1.3 is still under development I guess thats the way to go, I'll give it a try later, I hope it's stable...If you have any suggestions or comments, just let me know,

Thanks,

kaerimasu
04-12-2010, 12:12 PM
I had to do the same thing and SDL 1.3 worked just fine for me. There are a few API changes that I ran into. In particular, SDL_GetKeyState was removed, replaced by SDL_GetKeyboardState.

- Chris

jmfairlie
04-14-2010, 12:11 PM
This seems to be an old opengl joke but I just found it .... still laughing my ass off...

http://www.youtube.com/watch?v=sddv3d-w5p4&feature=related