PDA

View Full Version : glewIsSupported() wrong?



Raphael2
08-15-2008, 10:51 AM
Hello,

I'm trying to get the extensions to work (running Vista 64bit)

Now this code


const GLubyte *vendor = glGetString(GL_VENDOR);
const GLubyte *rend = glGetString(GL_RENDERER);
const GLubyte *vers = glGetString(GL_VERSION);
const GLubyte *ext = glGetString(GL_EXTENSIONS);

GLenum err = glewInit();
if (GLEW_OK != err)
{
/* Problem: glewInit failed, something is seriously wrong. */
const GLubyte *e = glewGetErrorString(err);
fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
}
fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
const GLubyte *version = glewGetString(GLEW_VERSION);

GLenum err2 = glewIsSupported("GL_VERSION_2_0 GL_ARB_pixel_buffer_object");
if (GLEW_OK != err) {
fprintf(stderr, "Required OpenGL extensions missing.");
exit(-1);
}


Gives me correctly
Vendor = Nvidia
Renderer = "GeForce 8800 GTX/PCI/SSE2"
Extensions = "GL_ARB_color_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_10 const unsigned char *


But still the glewIsSupported() call fails! What did I do wrong?
Thanks,
Raphael