if (GL_ARB_vertex_shader) {
printf("Possible
");
}
When i try this, it say “Driver does not support OpenGL Shading Language”
// Ensure we have the necessary OpenGL Shading Language extensions.
if (glewGetExtension("GL_ARB_fragment_shader") != GL_TRUE ||
glewGetExtension("GL_ARB_vertex_shader") != GL_TRUE ||
glewGetExtension("GL_ARB_shader_objects") != GL_TRUE ||
glewGetExtension("GL_ARB_shading_language_100") != GL_TRUE)
{
fprintf(stderr, "Driver does not support OpenGL Shading Language
");
exit(1);
}
What is this talking about actually?Does my hardware support open glsl?
[Edit]
I found that my pc does not support GL_ARB_fragment_shader only when I take out “glewGetExtension(“GL_ARB_fragment_shader”)!= GL_TRUE”.
Why it support GL_ARB_vertex_shader but not GL_ARB_fragment_shader?Both should be together right? [/Edit]
There’s a reason why it isn’t called “GL_ARB_vertex_and_fragment_shader”. Namely, so that implementations can choose to implement one or the other. The interface between the fixed-function pipeline and shaders is well specified, so it’s not difficult to have a vertex shader work with texture environment stuff.
The i945 has no hardware support for vertex processing at all. So ARB_vertex_shader will be completely software emulated.
Support for ARB_fragment_shader will depend on the driver. The Mac i945 driver does support this extension, looks like Mesa does not. The hardware is very limited (compared to modern ATI/NV hardware), so you should expect complex fragment shaders to fall back to software emulation even if the extension is supported.
fprintf(stderr, "Driver does not support OpenGL Shading Language
");
exit(1);
}
it seems like GL_ARB_fragment_shader is not supported here. When i comment take off this extension and run the test again, it does not print out statement “Driver does not support OpenGL Shading Language” anymore.