Results 1 to 4 of 4

Thread: Refresh Rate

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2001

    Refresh Rate

    Hi there,

    Im the programmer of NVmax and i'm looking for some way to force a certain refresh rate in OpenGL. At the moment this can be done in DirectX using DXdialog however I can find no reg key for OpenGL refresh force.

    Any help to but be greatly appriechiated,

    Thanks for your time.


  2. #2
    Junior Member Newbie
    Join Date
    Aug 2001

    Re: Refresh Rate

    ^ ?

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Feb 2000

    Re: Refresh Rate

    Set your displayfrequency in the dmDisplayFrequency member of the DEVMODE structure you pass to ChangeDisplaySettings. Also, don't forget to add DM_DISPLAYFREQUENCY to dmFields.

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2001

    Re: Refresh Rate

    This will only change the refresh rate of Windows, as far as I understand OpenGL defaults to 60Hz in all resolutions like DirectX unless forced via a reg key.

    Can I also ask since you are knowledgeable on the ChangeDisplaySettings function why it wont return refresh rates in 9x/me.

    Here is my code

    Private Type DEVMODE
    dmDeviceName As String * CCDEVICENAME
    dmSpecVersion As Integer
    dmDriverVersion As Integer
    dmSize As Integer
    dmDriverExtra As Integer
    dmFields As Long
    dmOrientation As Integer
    dmPaperSize As Integer
    dmPaperLength As Integer
    dmPaperWidth As Integer
    dmScale As Integer
    dmCopies As Integer
    dmDefaultSource As Integer
    dmPrintQuality As Integer
    dmColor As Integer
    dmDuplex As Integer
    dmYResolution As Integer
    dmTTOption As Integer
    dmCollate As Integer
    dmFormName As String * CCFORMNAME
    dmUnusedPadding As Integer
    dmBitsPerPel As Long
    dmPelsWidth As Long
    dmPelsHeight As Long
    dmDisplayFlags As Long
    dmDisplayFrequency As Long
    End Type

    Public Function enumscreenhz()
    On Error Resume Next
    Dim lindex As Integer
    Dim tDevMode As DEVMODE
    lindex = 0

    If EnumDisplaySettings(displayn, lindex, tDevMode) = 0 Then: Exit Do
    lindex = lindex + 1

    If Val(tDevMode.dmPelsWidth) & " by " & Val(tDevMode.dmPelsHeight) = nv.display(0).Text Then
    If tDevMode.dmBitsPerPel & " Bits" = nv.display(1).Text Then
    nv.display(2).AddItem tDevMode.dmDisplayFrequency & " Hertz"
    End If
    End If

    End Function

    In summary the user selects the resolution and color depth to use (which are enumerated fine in 9x/2000) and the code enumerates all the refresh rates found that have that resolution and color depth and adds them to the list box.

    Whilst this works fine in 2000/XP it always returns 0 in 9x/me, and to this day I can not find out why?

    Thanks for your time,


Similar Threads

  1. Refresh rate
    By AndyB in forum OpenGL: User Software
    Replies: 5
    Last Post: 02-27-2003, 03:44 PM
  2. refresh rate
    By mohamed adel in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-24-2003, 10:55 AM
  3. Refresh Rate and FPS on a GF3
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 04-13-2002, 07:11 AM
  4. Pbm with refresh rate !!!
    By in forum OpenGL: User Software
    Replies: 1
    Last Post: 10-15-2001, 05:08 PM
  5. Refresh Rate
    By Rayie in forum OpenGL: User Software
    Replies: 0
    Last Post: 03-29-2001, 12:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean