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: glGetString(GL_VERSION) return Null... argh !

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2002
    Location
    France
    Posts
    8

    glGetString(GL_VERSION) return Null... argh !

    hello, i'm trying to build a program that display the OpengL version and Extensions of the API present on my computer. The problem is that when i try to execute this code :

    const unsigned char * version ;

    version = (const unsigned char *)glGetString(GL_RENDERER);
    printf ("My OpenGL version is %s\n", version);

    it returns me a Null string...

    could someone explain me what i did wrong there ?
    PS : it does the same with GL_VENDOR or GL_RENDERER...

    regards

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    1,063

    Re: glGetString(GL_VERSION) return Null... argh !

    You need to have a valid OpenGL context at the time of calling glGetString();

    Are you sure you have this?

    Nutty

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2002
    Location
    France
    Posts
    8

    Re: glGetString(GL_VERSION) return Null... argh !

    I think so yes :
    -> I have the latest Opengl Drivers (via my Geforce DDR)
    -> I have all the OpenGl headers and Lib in my Visual C++.

    What could I forget ?

  4. #4
    Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Germany
    Posts
    261

    Re: glGetString(GL_VERSION) return Null... argh !

    But did you setup a valid OpenGL rendering context with wglCreateContext and wglMakeCurrent (+ all the other stuff, that has to be done)?

    Diapolo

    [This message has been edited by Diapolo (edited 03-11-2002).]

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2002
    Location
    France
    Posts
    8

    Re: glGetString(GL_VERSION) return Null... argh !

    You're wright... i didn't ...
    i'm a stupid animal ! grr ! ;P

    thanks a lot !

Posting Permissions

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