OpenGL extension without using wglprocaddress?

BlitzMax Forums/BlitzMax Programming/OpenGL extension without using wglprocaddress?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I need to get the pointer to the extension function glDrawElementsInstancedEXT(). I used to use wglgetprocaddress() but then I started relying on Glew. How do I do this in a way so that it works on all platforms?

I really need this answer. For some reason retrieving the pointer to some functions corrupts some of my memory. Something must be wrong:

Extern
	Function wglGetProcAddress:Byte Ptr(name$)="wglGetProcAddress@4"
EndExtern


SetGraphicsDriver GLGraphicsDriver(),GRAPHICS_BACKBUFFER|GRAPHICS_DEPTHBUFFER
Graphics 1024,768,0
glewInit()


Global glUniformBufferEXT(a%,b%,c%) "win32"
Global glDrawElementsInstancedEXT(mode_:Int,count_:Int,type_:Int,indices:Byte Ptr,primcount:Int) "win32"

glDrawElementsInstancedEXT=wglGetProcAddress("glDrawElementsInstancedEXT")
glUniformBufferEXT=wglGetProcAddress("glUniformBufferEXT")