glCreateProgramObjectARB crashes delphi app

Hi

Ive been trying to get the basics of shaders under the knee. Ive written a very basic shader
in GLSL but now I am trying to run the program but on init when I call glCreateProgramObjectARB it crashes with an access violation. Im using Delphi 7 with the gl.pas and glext.pas from delphi3d. I also read the lighthouse3d tutorials.
Is it maybe connected to the setting up of my pixel format? If someone could help me it would be much appreciated cause this is getting frustrating.

Did you initialize your extension pointers?
Are you passing correct strings to OpenGL?

must

glewInit()

Looks to me as if you don’t initialize the pointer to the function correctly. If I am not mistaken, there are functions like Load_***_extension. Make shure that you create a valid context and load the extension properly.

Thanks guys, I did indeed forget to load some of the extensions. Do any of you know what extension I should load to be able to call glActiveTexture(GL_TEXTURE0) since this is also giving me an access violation. I got the simpletexture shader from lighthouse3d working but the multitexturing one doesnt want to work.
I either get one of the textures or the other but not both combined. I think I have to do something like:
glActiveTexture(GL_TEXTURE0);{this causes violat}
glBindTexture(GL_TEXTURE_2D,tex);glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D,l3d);
but glActiveTexture cases the violation.
Does anyone know how to fix this?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.