Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Why is glewIsSupported() wrong?

  1. #1
    Member Regular Contributor
    Join Date
    Apr 2007
    Location
    Fairfax, VA
    Posts
    252

    Why is glewIsSupported() wrong?

    I have the following code:

    Code :
        GLenum err = glewInit();
        cerr << glGetString(GL_EXTENSIONS) << "\n";
        if (err != GLEW_OK ||
            !glewIsSupported("GL_ARB_color_buffer_float GL_EXT_framebuffer_object GL_EXT_packed_depth_stencil"))
            capable = false;

    The printout of the extensions clearly indicates that all three of those extensions are present, yet the glewIsSupported() call is returning false. If I break it down to three separate checks, the first two work but GL_EXT_packed_depth_stencil does not register as present (despite being in the GL_EXTENSIONS printout).

    What could possibly be causing this?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    802

    Re: Why is glewIsSupported() wrong?

    GL_EXT_packed_depth_stencil is part of core OpenGL3.0. Are you sure that u have setup an opengl 3 context? how are u initializing the context? Are u using freeglut? let us know the details about it.
    Regards,
    Mobeen

  3. #3
    Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    466

    Re: Why is glewIsSupported() wrong?

    No need for GL 3 context since the date of this extension (2005), cf http://www.opengl.org/registry/specs...th_stencil.txt

    This extension has no functions, so try to use its tokens, and see if it works.

    For about glew, I never used it so I can't know. But try to check glewexperimental (http://glew.sourceforge.net/basic.html), or put less extension in glewIsSupported.

  4. #4
    Member Regular Contributor
    Join Date
    Apr 2007
    Location
    Fairfax, VA
    Posts
    252

    Re: Why is glewIsSupported() wrong?

    Simply removing the check "solved" the problem, since the extension works without incident. I still find it extremely strange that this was happening though and I'm curious what could have caused it.

    I always figured that glewIsSupported was just parsing the string returned by glGetString, but maybe not?

  5. #5
    Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    466

    Re: Why is glewIsSupported() wrong?

    Look at the code if you want to know

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •