glCreateShader returns 0.

Hi,

I’m currently trying to learn how to use the GLSL but I have this problem: whenever I call glCreateShader, with GL_FRAGMENT_SHADER or GL_VERTEX_SHADER, it returns 0…

I’m using SDL for the display but I don’t think it has an impact,I use GLee for the extentions, and whatever place I put the call, it returns 0.

Is there something to initialize? I don’t understand what’s going on.

If you have any idea please help.

is it possible its somewhere inside glBegin/glEnd calls?

It’s not…

EDIT:
OS:Windows XP Professional
dxdiag -> Intel® 89215G/GV/910GL Express Chipset
driver v6.14

What is your hardware configuration, OS, graphic driver version?

Try to use glCreateShaderObjectARB or glCreateShaderObject function instead.

is your context current?
i’ve seen people try to compile shaders in constructors before now, y’see.

I have GLee though it doesnt seem to have declared glCreateShaderObjectARB, what extention do I need?

@knackered, afaik it is…

GLee should have glCreateShaderObjectARB function declared. Are you using latest version, not some very old one?

Also - does your videocard/driver supports GL_ARB_shader_objects extension at all? Try chechking it with GLee:

if (GLEE_ARB_shader_objects == GL_FALSE)
{
   error("Sorry, GLSL shaders not supported!");
}

like always its better to download a working sample which uses shaders and see if it runs, just to be sure.