wglGetProcAddress & Extentions

I am trying to use the GL_KTX_buffer_region extention but I’m having trouble defining the functions, below are a few examples of how I have tried to define them and the error messages I have received. This is for Win98 and I have a Geforce 2 MX so it should support it.

extern GLuint APIENTRY glNewBufferRegion (GLenum);
typedef GLuint (APIENTRY * PFNGLNEWBUFFERREGIONPROC) (GLenum type);

if (strstr((const char*)glGetString(GL_EXTENSIONS), “GL_KTX_buffer_region”) != NULL)
{
glNewBufferRegion = (GLuint(*)(GLenum))wglGetProcAddress (“glNewBufferRegion”);
}

error C2659: ‘=’ : overloaded function as left operand

OR

PROC glNewBufferRegion;

if (strstr((const char*)glGetString(GL_EXTENSIONS), “GL_KTX_buffer_region”) != NULL)
{
glNewBufferRegion = wglGetProcAddress(“glNewBufferRegion”);
}

(*glNewBufferRegion)(GL_KTX_Z_REGION);

error C2197: ‘int (__stdcall *)(void)’ : too many actual parameters

Any help would be greatly appreciated!!!

Also the gfx.h header that comes with the 3D Studio Max 3.1 SDK is meant to define the constants but doesn’t, anyone know why.

What about
typedef GLuint (APIENTRY * PFNGLNEWBUFFERREGIONPROC) (GLenum type);
PFNGLNEWBUFFERREGIONPROC glNewBufferRegion = NULL;

glNewBufferRegion = (PFNGLNEWBUFFERREGIONPROC) wglGetProcAddress(“glNewBufferRegion”);

PS: Forgot the brackets in the cast.

[This message has been edited by Relic (edited 03-20-2001).]

Cheers, worked a treat!!!