Jump to content
  • Advertisement
Sign in to follow this  
moetman

OpenGL OpenGL Vertex Buffer Extensions

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

I'm having trouble trying get pointers to the gl functions below by calling something like glGetProcAddress("Some function string"); , glGenBuffersARB = (PFNGLGENBUFFERSARBPROC) glGetProcAddress("glGenBuffersARB"); glBindBufferARB = (PFNGLBINDBUFFERARBPROC) glGetProcAddress("glBindBufferARB"); glBufferDataARB = (PFNGLBUFFERDATAARBPROC) glGetProcAddress("glBufferDataARB"); glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC) glGetProcAddress("glDeleteBuffersARB"); but glGetProcAddress doesn't exist does it ? wglGetProcAddress() doesn't help either , I think it is related to Win32. The only function I found to work was SDL_GL_GetProcAddress , but is related to SDL, Am I missing something ? Do you really need to have pointers to these functions to get Vertex Buffer Extensions to work ?

Share this post


Link to post
Share on other sites
Advertisement
What OS are you using? If it's Linux, the function is going to be somthing like xglGetProcAddress and under OSX it's aglGetProcAddress. And yes, you are correct, wglGetProcAddress is the win32 version.

Share this post


Link to post
Share on other sites

Something like

#if defined(WINDOWS)
#define glGetProcAddress wglGetProcAddress
#else if defined(X11)
#define glGetProcAddress glXGetProcAddress
#else if defined(MACINTOSH)
#define glGetProcAddress aglGetProcAddress
#else if defined(BEOS)
#define glGetProcAddress beosGetProcAddress
etc...
#endif

I'm using Fedora Core 3 using X Windows but still get errors about glXGetProcAddressARB.

found this:
http://www.gamedev.net/community/forums/topic.asp?topic_id=325757

How can I satically link glXGetProcAddressARB into my app ? that may solve my prob

[Edited by - moetman on August 29, 2005 11:08:04 PM]

Share this post


Link to post
Share on other sites
http://www.devmaster.net/articles/oglVertexBuffer/
Maybe that'll help? I believe the function is in the opengl32.lib file, so it shouldn't be undefined (as far as windows goes).

Share this post


Link to post
Share on other sites
You could consider using something like GLee (scroll down the page) to help loading extensions. Loading all function pointers manually might quickly get messy.

Share this post


Link to post
Share on other sites
I am using glew at the moment and i can recommend that extension library. It is well documented for user purposes and as far i am concerned works perfectly on Windos XP and Suse 9.11.

You can get it here

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!