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 3 of 3

Thread: How to access OpenGL Extensions under Windows?

  1. #1
    Junior Member Newbie
    Join Date
    May 2014
    Posts
    14

    How to access OpenGL Extensions under Windows?

    The book "OpenGL programming guide: the official guide to learning opengl, version 4.3" claims in page 847:



    But when I add the code
    Code :
    int nnn=glGetIntegerv(GL_NUM_EXTENSIONS);
    , expecting I can be returned number of extensions, I got nothing but a lot of errors. I referred to MSDN document here: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx, but found that there is no GL_NUM_EXTENSIONS token supported. Is the author kidding me? If not, how to access OpenGL Extensions under Windows (using so-called glGetIntegerv or not)? Thank you.

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,144
    Even the Red book is not what it was once.

    Like everything else needed for the extensions, GL_NUM_EXTENSIONS can find in glext.h. Both glext.h and wglext.h can be downloaded from OpenGL registry. Also, I recommend directly accessing required function with wglGetProcAddress(). If the function returns NULL it means the required extension is not supported.

  3. #3
    Junior Member Newbie
    Join Date
    May 2014
    Posts
    14
    Thank you, @Aleksandar.

Posting Permissions

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