Sign in to follow this  
moetman

OpenGL OpenGL Vertex Buffer Extensions

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this