GL_CLAMP_TO_EDGE Undeclared

Started by
3 comments, last by zix99 18 years, 1 month ago
This is a stange error. I thought that GL_CLAMP_TO_EDGE was a standard enum with opengl (no extension needed) but I keep getting the error `GL_CLAMP_TO_EDGE' undeclared (first use this function) (gcc) The actual line is glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE); There really isn't any reason why this shouldnt work. Is this a recent addition? All other opengl functions/params work Any thoughts? thanks [smile]
____________________________"This just in, 9 out of 10 americans agree that 1 out of 10 americans will disagree with the other 9"- Colin Mochrie
Advertisement
GL_CLAMP_TO_EDGE was introduced in 1.2.
Sometimes old OpenGL headers don't have it defined, for some reason.
Just define this at the top of your code, and your problem should be fixed:
#ifndef GL_CLAMP_TO_EDGE
#define GL_CLAMP_TO_EDGE 0x812F
#endif
Mike Popoloski | Journal | SlimDX
Well rather then take the quick fix for this one, I figure its probably not a good idea to have out of date stuff when It comes to OpenGl so where could I get V 1.2? I know generally that these are distrubuted through the grapics card vendors but I am having trouble finding the driver for my card

(ATI RADEON X600 SE)
____________________________"This just in, 9 out of 10 americans agree that 1 out of 10 americans will disagree with the other 9"- Colin Mochrie
Just include <gl/glext.h> and if you don't have that www.opengl.org does :)

If you want version 1.2 functions.. that's another story.

~zix~

EDIT: More specifically it can be found here
---------------------------------------------------Game Programming Resources, Tutorials, and Multimedia | Free Skyboxes

This topic is closed to new replies.

Advertisement