View Full Version : opengl extensions
demonoid
11-27-2003, 04:33 AM
hi there,
glext.h says the following:
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glActiveTextureARB (GLenum);
now the problem is that GL_GLEXT_PROTOTYPES apparently isn't defined on my system, so glActiveTextureARB(..) is also unavailable, which would be quite fine if i didnt need it, but unfortunately i do.
so does anyone know what libraries/includes/?? i'm missing and where i could get them?
thanks a lot!
system: win2000sp4, athlon xp1800, geforce4 mx440
Deiussum
11-27-2003, 07:28 AM
Under Windows you will need to use wglGetProcAddress(). glext.h should have typedefs for the function pointers you need so you would do something similar to:
PFNGLACTIVETEXTUREPROC glActiveTextureARB = wglGetProcAddress("glActiveTextureARB");
Note: You have to do this AFTER you have a valid GL context created.
Edit: Also should note that you should check the version/extensions string with glGetString first. And if your version is >=1.3(?) for this particular function you should be able to use "glActiveTexture" instead of "glActiveTextureARB."
[This message has been edited by Deiussum (edited 11-27-2003).]
JanHH
01-10-2004, 05:28 PM
in case you didn't fix this yet:
if GL_GLEXT_PROTOTYPES isn't defined, well, then, define it!
#define GL_GLEXT_PROTOTYPES
#include "GL/gl.h"
#include "GL/glu.h"
#include "GL/glext.h"
Jan
demonoid
01-10-2004, 10:53 PM
i think that was the first thing i actually tried ;-)
but i solved it by now.
thanks anyhow!
Deiussum
01-12-2004, 04:47 AM
Originally posted by JanHH:
in case you didn't fix this yet:
if GL_GLEXT_PROTOTYPES isn't defined, well, then, define it!
#define GL_GLEXT_PROTOTYPES
#include "GL/gl.h"
#include "GL/glu.h"
#include "GL/glext.h"
Jan
That'd get rid of the error saying it's not defined, but then you would get a linker error since opengl32.lib doesn't have an entry point to any of those functions. http://www.opengl.org/discussion_boards/ubb/smile.gif Under Windows, you have to use the function pointer typedefs and wglGetProcAddress().
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.