Page 1 of 1

Compilation error ('PFNGLBLENDEQUATIONPROC' : undeclared id)

Posted: Tue Nov 01, 2005 16:11
by lothei
Hi :)

Im trying to compil gzdoom with ms vs.net 2k3; but i get these errors :

Code: Select all

Compiling...
r_opengl.cpp
r_opengl.cpp(300) : error C2065: 'PFNGLBLENDEQUATIONPROC' : undeclared identifier
r_opengl.cpp(300) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
r_opengl.cpp(302) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
r_opengl.cpp(302) : error C3861: 'PFNGLBLENDEQUATIONPROC': identifier not found, even with argument-dependent lookup
And i cant find any solution, i downloaded gl files from here :
http://oss.sgi.com/projects/ogl-sample/sdk.html

Anyone has an idea why i get these errors?

*edit* and because of these errors on project r_opengl, the project gzdoom wont compil

Posted: Tue Nov 01, 2005 16:47
by lothei
Ok, i found a solution (not the best i think)
i commented the lines using PFNGLBLENDEQUATIONPROC

Code: Select all

	//gl->BlendEquation = (PFNGLBLENDEQUATIONPROC)wglGetProcAddress("glBlendEquation");
	// If that fails try the EXT version
	//if (!gl->BlendEquation) gl->BlendEquation = (PFNGLBLENDEQUATIONPROC)wglGetProcAddress("glBlendEquationEXT");
	// If that fails use a no-op dummy
	//if (!gl->BlendEquation) gl->BlendEquation = glBlendEquationDummy;
	gl->BlendEquation = glBlendEquationDummy;
now it works

Posted: Tue Nov 01, 2005 18:47
by timmie
So you grabbed glext.h and wglext.h, right? And you saved them to the "gl" directory in your include path (gl.h and glu.h should be in there as well)?

Posted: Thu Nov 03, 2005 16:46
by lothei
First i tried with the files included with vs.net 2k3, i think they are good too
I has this error,
So i tried with files downloaded from this url, i cant remember where i took glu, but it was somewhere on opengl.org
And.. same error

That's wierd because PFNGLBLENDEQUATIONPROC is defined in glext.h, so there shouldnt be any problem

And just by removing the two lines using PFNGLBLENDEQUATIONPROC (so that only the last condition is used, the one that doenst use PFNGLBLENDEQUATIONPROC) it worked... so it's not a big problem, it's just wierd :)