I don't quite understand the whole Hertz business when setting up graphics displays/windows or flipping the display at the right time.
1. Apparently if you don't specify a hertz rate and you set the color depth to 0, when calling Graphics(), you get a 60Hz default refresh rate. This isn't necessarily the hertz rate of the display. Presumably, though, this is quite a popular hertz rate so it might be synchronized to the display quite often. This seems to apply to windowed mode and fullscreen mode. But doesn't this mean that Graphics() really doesn't know what the display's hertz rate is? If I open a 75Hz fullscreen display, by passing 0 as the hertz rate, will it actually be 75Hz refresh or 60?
2. I can see how this `unknowingness` of the hertz rate can be avoided in full-screen displays, by selecting an actual `known` mode from the list of modes you get back from GetGraphicsMode() or GraphicsModes(). If the data includes the actual hertz rate of the display, you can then know how often to ideally flip the display. However, on some systems the Hertz rate in the mode info is passed back as 0, maybe particularly applicable to LCD screens. With hertz of 0, the mode opens correctly at whatever hertz rate it is, but you don't know what that hertz rate is. Is the only option to then guess a 60Hz software rate, or how can we find the actual rate of the display (requires waiting for the VBlank reliably) ??
3. If I want to use GLGraphics() or CreateGraphics() for full-screen modes, I have to know the hertz rate I want to give the object before I open the display. Presumably that has to be the rate found in the list of graphics modes otherwise the display will not open (or 0 is default). So then the graphics object might be 0 or a hertz rate, if you're lucky, but it's 0 you're out of luck. It also appears that Flip 1 or Flip -1 do not wait before flipping, at all, unless the display was created with Graphics(). All flips act like Flip 0. To update at a given rate I have to use CreateTimer() at a given hertz rate. What hertz rate?
4. What we basically need, I think, are two things. Open the display, whatever method, then a) A way of reliably waiting for the vertical blank on all systems (OpenGL only please), and then b) do a timed test to see how long it takes to do x number of flips from which we could find something `near to` the hertz rate of the actual display, which we could round up or down to the nearest 5 Hz perhaps since the timer is inaccurate. OR ... if BRL could provide the ACTUAL hertz rate of the display even when it's listed as 0, that would work too.
Summary: Full-screen modes, find the actual mode and open it. If you know the hertz, use that, if not, use 60. Windowed mode, try and match the desktop mode to one from the list if possible and get the hertz from it to use, or if 0 then just go with 60Hz? Do we have no choice but to use 60Hz when we don't know the hertz rate?
Any ideas/comments/suggestions appreciated.
1. Apparently if you don't specify a hertz rate and you set the color depth to 0, when calling Graphics(), you get a 60Hz default refresh rate. This isn't necessarily the hertz rate of the display. Presumably, though, this is quite a popular hertz rate so it might be synchronized to the display quite often. This seems to apply to windowed mode and fullscreen mode. But doesn't this mean that Graphics() really doesn't know what the display's hertz rate is? If I open a 75Hz fullscreen display, by passing 0 as the hertz rate, will it actually be 75Hz refresh or 60?
2. I can see how this `unknowingness` of the hertz rate can be avoided in full-screen displays, by selecting an actual `known` mode from the list of modes you get back from GetGraphicsMode() or GraphicsModes(). If the data includes the actual hertz rate of the display, you can then know how often to ideally flip the display. However, on some systems the Hertz rate in the mode info is passed back as 0, maybe particularly applicable to LCD screens. With hertz of 0, the mode opens correctly at whatever hertz rate it is, but you don't know what that hertz rate is. Is the only option to then guess a 60Hz software rate, or how can we find the actual rate of the display (requires waiting for the VBlank reliably) ??
3. If I want to use GLGraphics() or CreateGraphics() for full-screen modes, I have to know the hertz rate I want to give the object before I open the display. Presumably that has to be the rate found in the list of graphics modes otherwise the display will not open (or 0 is default). So then the graphics object might be 0 or a hertz rate, if you're lucky, but it's 0 you're out of luck. It also appears that Flip 1 or Flip -1 do not wait before flipping, at all, unless the display was created with Graphics(). All flips act like Flip 0. To update at a given rate I have to use CreateTimer() at a given hertz rate. What hertz rate?
4. What we basically need, I think, are two things. Open the display, whatever method, then a) A way of reliably waiting for the vertical blank on all systems (OpenGL only please), and then b) do a timed test to see how long it takes to do x number of flips from which we could find something `near to` the hertz rate of the actual display, which we could round up or down to the nearest 5 Hz perhaps since the timer is inaccurate. OR ... if BRL could provide the ACTUAL hertz rate of the display even when it's listed as 0, that would work too.
Summary: Full-screen modes, find the actual mode and open it. If you know the hertz, use that, if not, use 60. Windowed mode, try and match the desktop mode to one from the list if possible and get the hertz from it to use, or if 0 then just go with 60Hz? Do we have no choice but to use 60Hz when we don't know the hertz rate?
Any ideas/comments/suggestions appreciated.