Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: check OpenGl version ?????

  1. #1

    check OpenGl version ?????

    Hi ...
    I want code to check what's the OpenGl version on my computer

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    check OpenGl version ?????

    [size=9px]This thread belongs here in the Graphics forum more so than it does in the GLScene forum so I moved it. Also, I've noticed that the number of question marks seems to keep growing with your subject titles. Just one will suffice my friend.[/size]


    I think that if you try out a neat little tool called GLInfo created by Tom Nuydens it will tell you exactly what functions are supported by your card and what version of OpenGL is supported. Also, it gathers in a huge database all the information from users that choose to contribute their video card's specs. You can find it here.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3

    check OpenGl version ?????

    Use glGetString(GL_VERSION) function.

  4. #4

    check OpenGl version ?????

    why didn't work ?

    Code:
    uses OpenGL1X;
    
    procedure TForm1.Button1Click(Sender: TObject);
    begin
     Edit1.text := glGetString(GL_VERSION);
     // no value in edit1
    end;

  5. #5

    check OpenGl version ?????

    I think there needs to be an active OpenGL rendering context before that function will work.
    [size=10px]"In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite." -- Paul Dirac[/size]

  6. #6

    check OpenGl version ?????

    Maybe this will work:
    [pascal]
    uses OpenGL; //changed Opengl1x to OpenGL

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    ShowMessage('OpenGL vendor ' + glGetString(GL_VENDOR));
    ShowMessage('OpenGL renderer ' + glGetString(GL_RENDERER));
    ShowMessage('OpenGL version ' + glGetString(GL_VERSION));
    ShowMessage('Supported OpenGL extensions ' + glGetString(GL_EXTENSIONS));
    end;
    [/pascal]

    good luck

    Edit: Oops just tested... unfortunatly it didn't work on my pc ops:
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  7. #7

    check OpenGl version ?????

    I think there needs to be an active OpenGL rendering context before that function will work.
    You are right i downloaded Nehe's first tutorial and included the code at the end of the "CreateGLWindow" routine. And it worked.

    You should try to find out which OpenGL routine(s) need to be called before you can get the GL version.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  8. #8

    check OpenGl version ?????

    Please can you write the full code now

  9. #9

    check OpenGl version ?????

    So for example, if you're using SDL as your windowing system, then the glGetString(GL_VERSION) function won't work until after you call the SDL_SetVideoMode function. If you're on Windows I suspect it would be after the call to the CreateWindowEx function. If you're using GLUT I think it would be after the call to the glutCreateWindow function.
    [size=10px]"In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite." -- Paul Dirac[/size]

  10. #10

    check OpenGl version ?????

    Go to this page and download the delphi source. It contains the source for setting up a OGL window.

    Just add the glGetString at the end of the window creation routine and then it should work.

    Good luck
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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