Access violation thrown by shaderManager.InitializeStockShaders()

I’m trying to use the GLTools library with glew and wglew to make a OpenGL windows screensaver. Something is going wrong with ShaderManager.InitializeStockShader(). I set up my windows rendering context no problem and specify that I want to use OpenGL 3.1 functionality, but I’m not even sure if I need to use OpenGL 3.1 to accomplish my task. I just bumped it up thinking it might solve my problem. It didn’t. Has anybody had problems using the GLTools library with glew or wglew? Because I think that’s where the problem lies. If anybody could shed some light on this problem I’d appreciate. If you need more detail on what my issue is or need me to post my code just tell me and I will. I’m just hoping one of you out there knows what I’m coming up against from what I’ve explained so far. Thanks guys.

Hi, A few things that i remember about GLTools library.

  1. Make sure you set working directory by calling gltSetWorkingDirectory(argv[0]); before glutInit
  2. Make sure you set the glewExperimental = GL_TRUE; before glewInit() call.

See if any of these help.

Hi Mobeen. Thanks for replying to my question. I’ve already done the glewExperimental = GL_TRUE; thing. And because I’m writing a win32 program here I don’t get command line arguments passed to it the way you do with command line programs. All I really know about the shaderManager class is that it sets up some stock shaders for you so you can work with the new OpenGL core profile as intended, which as far as I know requires at least minimal shader with every OpenGL program you write.