GL_CLAMP_TO_EDGE - non-existing?

Started by
2 comments, last by Tompa 20 years, 5 months ago
For some reason my compiler wont recognize GL_CLAMP_TO_EDGE. Do I have to install a newer OpenGL library or something? Could it be something else? This is the call it complains about: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); Any ideas?
Advertisement
It''s part of OpenGL 1.2, which is why it isn''t in Microsoft''s OpenGL 1.1 header.

Add this line to your code somewhere. BTW, you should probably check the GL version at runtime before using it.
#define GL_CLAMP_TO_EDGE 0x812F 


There is no later version of the OpenGL library on Windows. More recent features are accessed through function pointers which have to be linked at runtime. There are several libraries which can do this for you though, effectively giving you OpenGL 1.4 support without having to load any function pointers. See the FAQ (or my sig) for details.

____________________________________________________________
www.elf-stone.com | Automated GL Extension Loading: GLee 2.00 for Win32 and Linux

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

Thanks for your answer!

How do I check wich gl version I have at runtime?
Call glGetString with GL_VERSION and then convert the string to a float.

Of course, if you were using GLee, you could just do:
if (GLEE_VERSION_1_2)
{
}

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

This topic is closed to new replies.

Advertisement