Hi, do You know how to launch GLSL in window using winapi ?
I have some shader prepared - and it works on GLUT. But when i want to use it in winapi - program crashes and there is a message that
glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB) returns NULL.
I use wglGetProcAddress to get all i want but still it doesn’t work.
You need to call glewInit AFTER you have set up your complete window and OpenGL context, but before doing any rendering.
If GL_RENDERER is something with “Microsoft” you have set your parameters for ChoosePixelFormat wrong, so that you only get a software renderer, that does not expose any modern extensions.
However, in that case GLEW will not detect GLSL support, at all, anyway.