M/\dm/\n

11-26-2009, 05:16 AM

How are you supposed to get opengl 1.1 function pointers if you use gl3.h?

I want to divide all initialization in functions like so:

int InitGL_1_0()

{

if(!(glCullFace = (PFNGLCULLFACEPROC)wglGetProcAddress("glCullFace"))) return 0;

if(!(glFrontFace = (PFNGLFRONTFACEPROC)wglGetProcAddress("glFrontFace"))) return 0;

if(!(glHint = (PFNGLHINTPROC)wglGetProcAddress("glHint"))) return 0;

if(!(glLineWidth = (PFNGLLINEWIDTHPROC)wglGetProcAddress("glLineWidth"))) return 0;

...

But I get an error that function "glCullFace" cannot be found, how do I get it then?

I don't want to include gl.h, only gl3.h for new prototypes.

I want to divide all initialization in functions like so:

int InitGL_1_0()

{

if(!(glCullFace = (PFNGLCULLFACEPROC)wglGetProcAddress("glCullFace"))) return 0;

if(!(glFrontFace = (PFNGLFRONTFACEPROC)wglGetProcAddress("glFrontFace"))) return 0;

if(!(glHint = (PFNGLHINTPROC)wglGetProcAddress("glHint"))) return 0;

if(!(glLineWidth = (PFNGLLINEWIDTHPROC)wglGetProcAddress("glLineWidth"))) return 0;

...

But I get an error that function "glCullFace" cannot be found, how do I get it then?

I don't want to include gl.h, only gl3.h for new prototypes.