Skip to main content
gamedev.net
🔒 Locked

Extensions in C++

Started by Geometrian Jun 19, 2010 at 6:09 PM 1 replies 850+ views
Original Post
Geometrian
Geometrian
Hi,

I'm fairly new to C++, but certainly not to programming, nor to OpenGL. Right now, I'm trying to get extensions working properly.

PyOpenGL (which is what I was using before) makes defining the necessary functions extremely easy (just use the Python import statement with * and all the tokens and functions are loaded into the namespace).

I'm trying to move some of my more advanced stuff to C++, and extensions are necessary. What's the best way to go about defining the functions and tokens? My current approach was to, for example:
glMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC ) wglGetProcAddress("glMultiTexCoord1dARB" );
for each function (in this case, after checking for the existence of "GL_ARB_multitexture").

Is there a better way to do this? I want something that not only checks that the functions/tokens are available, but actually defines them as well. Help?

Thanks,
Ian
[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]
Einar89
Einar89
There are a couple of libs that take care of that. I use GLee
Geometrian
Geometrian
Seems to be working. Thanks!
[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.