• Advertisement

Archived

This topic is now archived and is closed to further replies.

GL_CLAMP_TO_EDGE - non-existing?

This topic is 5211 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


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

Share this post


Link to post
Share on other sites
Thanks for your answer!

How do I check wich gl version I have at runtime?

Share this post


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

Share this post


Link to post
Share on other sites

  • Advertisement