Sign in to follow this  
raptorstrike

GL_CLAMP_TO_EDGE Undeclared

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this