View Full Version : GL_CLAMP_TO_EDGE_EXT

10-17-2002, 08:46 AM
Hi. I've been developing an OpenGL engine for about 5 months now (see it at http://home.earthlink.net/~ioquan ). I'm using v1.1, and up until this point I've avoided using extensions. Now I want to use the GL_CLAMP_TO_EDGE_EXT. I've looked around at some tutorials on using extensions, but there are a couple of things that are unclear. First of all, all the tutorials I've seen on extensions use wglGetProcAddress. I want to avoid using any wgl stuff, because I would like for my engine to work on linux as well as Windows. Also, since GL_CLAMP_TO_EDGE_EXT is not a procedure I wonder if it's usage is different than some of the other extensions.

So what I want to know is: how can I use extensions without wgl, and what do I need to know specifically for using GL_CLAMP_TO_EDGE_EXT?

[This message has been edited by ioquan (edited 10-17-2002).]

10-17-2002, 09:10 AM
If you need a function pointer you must call wglGetProcAddress. But in this case this is not neccesary as the GL_EXT_texture_edge_clamp doesn't add any new function entry points. So what you need to do is call glGetString(GL_EXTENSIONS) and parse the returned string for "GL_EXT_texture_edge_clamp". If found, it's safe to use GL_CLAMP_TO_EDGE_EXT.

10-17-2002, 09:15 AM
Use extgl. It's pretty easy. And everything is already worked out for you.http://www.uni-karlsruhe.de/~uli2/

10-17-2002, 09:21 AM
This extension does not include any function to call so you don't need to take any pointer to it. If the extension exists in the extensions string then you can use CLAMP_TO_EDGE_EXT
This extension is part of the OpenGL 1.2 core.
Don't worry about using wglGetProcAddress, you need it to access function pointers in windows. AFAIK, you can use glXGetProcAddress in Linux.
Also, as far as I know, in Windows you need to get the function pointers of OGL 1.2, 1.3 & 1.4 functions that does not exists in OpenGL 1.1 (because the lack of MS supporting to OpenGL), but in Linux, Mac, ... you don't need it if you have the updated files. (I have never done anything on Linux, Mac, ... so I don't know the details)
Hope this helps.

10-18-2002, 10:24 AM
Thanks for the replies. So all I have to do is check if the extension exists in the string, and then I can use GL_CLAMP_TO_EDGE_EXT? This might be a stupid question, but when I try to use GL_CLAMP_TO_EDGE_EXT, I get an undeclared identifier error. Do I need a different gl.h or what?

10-18-2002, 10:48 AM
glext.h can be gotten from here http://oss.sgi.com/projects/ogl-sample/registry/

check the faq (www.opengl.org right side of page) theres a section on extensions