PDA

View Full Version : issues with glprocs



Morpheus011
10-30-2005, 05:47 PM
I am teaching myself shaders and am having a problem getting started. I am doing my shader initialization stuff like this


// create the shader objects
glGenProgramsARB(2, shaderID);
// vertex shader
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, shaderID[0]);

// load the vertex shader code lovin'
char *VertexShader = loadShader("VertexShader.glsl");

glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(VertexShader), VertexShader);for some reason I am getting a linker error saying I have an unresolved external symbol __extensionProcs. I am including glext.h and glprocs.h so that doesn't seem to be the issue. If I comment the above code out I don't get linker errors but I get other errors because it doesn't know what these functions are. If I need to post more code let me know, but if anyone can help it would be greatly appreciated, thanks

sqrt[-1]
10-30-2005, 05:59 PM
This is more of a C++/IDE problem but anyway...

What OS are you on? What compiler are you using? Are you using any OpenGL helper libraries or just including the headers from the SGI site? (helper libs like GLee or GLew - google for more info)

Morpheus011
10-30-2005, 06:13 PM
I'm using Visual Studio .net on windowsXP. I am not using any helper libraries, only glext.h, glprocs.h and the other necessary opengl stuff (glu.h, gl.h and the associated libraries). I have seen some other examples and the functions they use to generate the shader program object are a little different then the ones I am using. Is it possible that I'm using older versions and they may be depracated or just need some extra love? I am using the OpenGL super bible as a reference and these lines are directly from the book but there is no mention of any extension libraries or anything that may need to be included. Thanks again for any help you can give me.

Morpheus011
10-30-2005, 08:49 PM
well it looks like the problem may be related to MFC, I ported the project over to a pure Win32 environment and the issue has dissappeared...may be due to some funky stdafx.h issue (damn you MFC! :) )..I really need to learn .NET or something equivalent, getting tired of MFC's quirks