Jump to content
  • Advertisement
Sign in to follow this  
LonelyStar

OpenGL OpenGL extension loading under Linux (GLX)

This topic is 4835 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

Hello together, I have trouble loading OpenGL extensions under Linux. I did not find many good resources, so I do not know if what I am doing is any good: I do: #define GL_GLEXT_PROTOTYPES #include <GL/gl.h> #include <GL/glu.h> #include "glext.h" I check for support of extension: char* ext=(char*)glGetString(GL_EXTENSIONS); if(strstr(ext,"EXT_framebuffer_object")!=NULL) supported!!! And then I try to load the function pointers: glIsRenderbufferEXT = glXGetProcAddressARB((const GLubyte*)"glIsRenderbufferEXT"); ... This is what the compiler gives me: blabla.cc:20: error: `glIsRenderbufferEXT' undeclared (first use this function) Any help of what I am missing? (I checked, my glext.h inlcudes prototype definitions for glIsRenderbufferExt) Thanks!

Share this post


Link to post
Share on other sites
Advertisement
From

glIsRenderbufferEXT = glXGetProcAddressARB((const GLubyte*)"glIsRenderbufferEXT");


I'm guessing there is no actual glIsRenderBufferEXT function pointer. You'll need to declare one yourself.

Share this post


Link to post
Share on other sites
In one of your headers (or probably a new header) add:
// make sure you've included glext.h
extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT;

and in one c/cpp file:
PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT;

and make sure you include the header in every file which references glIsRenderbufferEXT.

Enigma

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!