Results 1 to 2 of 2

Thread: Refresh rate in OpenGL

  1. #1

    Refresh rate in OpenGL

    I think Eric mentioned it that we should have our games run at the refresh rate choosen by the user and not default back to 60hz when the resolution changes.

    Since my game is suffering from that very problem as well, I tried looking for a solution. Unfortunately without much succes. To this end, I was wondering of someone here knows of a solution.
    I'm using plain opengl, no sdl. The setup is pretty much taken from the opengl templates found on either www.sulaco.co.za or www.delphigl.de/

    Thank

  2. #2

    Refresh rate in OpenGL

    Got the answer. It was right under my nose :?

    Code:
    procedure TForm1.Button1Click(Sender: TObject);
    var
       DeviceMode:  TDeviceMode;result:integer;
    begin
       EnumDisplaySettings(nil,  Cardinal(-1),  DeviceMode);
       result:=DeviceMode.dmDisplayFrequency;
       showmessage(inttostr(result)+'hz');
    end;
    In case you ever need it....

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
  •