(Drv OpenGL + FLIP) do not respect the frequency indicated by Graphics() in full

Started by Rick, August 11, 2023, 19:15:18

Previous topic - Next topic

Rick

Hello,
  I ask you for a situation that I am noticing, it is when using the OpenGL driver and FLIP(). The situation occurs when using "full screen", the frequency speed limit (60 FPS) indicated in Graphics() is not respected, the FPS shoot up to the maximum that the (GPU + CPU) can represent. Is it a fault in the drivers of my PC? Am I doing something wrong? The problem is in Blitzmax "vanilla and NG". Any suggested solution?
  It doesn't happen with the DirectX9 Driver, neither in windowed mode for both drivers (OpenGL and Diretx9).
Thanks R.-
== The tRick is that there is no tRick ==

Baggey

Try using Flip(0) or Flip(1) hope that makes a difference for you.

Kind Regards Baggey
Running a PC that just Aint fast enough!? i7 4Ghz Quad core 32GB ram  2x1TB SSD and NVIDIA Quadro K1200 on Acer 24" . DID Technology stop! Or have we been assimulated!

Windows10, Parrot OS, Raspberry Pi Black Edition! , ZX Spectrum 48k, C64, Enterprise 128K, The SID chip. Im Misunderstood!

Rick

With the driver "SetGraphicsDriver(GLMax2DDriver())" fullscreen and Flip(1) or Flip(0), there are no changes. The limit of 60 FPS indicated by "Graphics(640, 480, 32, 60)" is not respected. Same symptom for BMax Vanilla and NG. In window mode the limit is respected. With directX9 without this problem.

R.-
== The tRick is that there is no tRick ==

Midimaster

I cannot confirm this problem on my machine. Here (64bit Win-10 on AMD Ryzen 3 with VEGA) this test app prints the value 60:

SuperStrict
SetGraphicsDriver GLMax2DDriver()

Graphics 640,480,32,60
Global TimeStamp:Int, Ticks:Int, LastTicks:Int
Repeat
    Cls
    If TimeStamp<MilliSecs()
        TimeStamp = MilliSecs()+999
        LastTicks = Ticks
        Ticks = 0
    EndIf
    Ticks = Ticks+1
    DrawText "FPS:" + LastTicks, 100,100
    Flip
Until AppTerminate() Or KeyHit(KEY_ESCAPE)

when I try it with a non existing MODE like 30Hz:
Graphics 640,480,32,30....it returns also 60!. So the graphics mode must exist.

Did you try to list all avaiable Graphic modes and check whether 640x480 at 60Hz is avaiable on your machine?

SuperStrict
SetGraphicsDriver GLMax2DDriver()

Graphics 640,480,32,30
Global TimeStamp:Int, Ticks:Int, LastTicks:Int

For Local i:Int=0 Until CountGraphicsModes()
    Local width:Int  , height:Int , depth:Int , hertz:Int
    GetGraphicsMode  i, width, height, depth, hertz
   
    Local text:String= "mode " + i  + ":    W=" + width + "   H=" + height + "    D=" + depth + "   Hz=" + hertz
    Print text
Next

...back from North Pole.

Rick

Quote from: Midimaster on August 12, 2023, 00:12:10I cannot confirm this problem on my machine. Here (64bit Win-10 on AMD Ryzen 3 with VEGA) this test app prints the value 60:
SuperStrict
SetGraphicsDriver GLMax2DDriver()
Graphics 640,480,32,60
Global TimeStamp:Int, Ticks:Int, LastTicks:Int
Repeat
    Cls
    If TimeStamp<MilliSecs()
        TimeStamp = MilliSecs()+999
        LastTicks = Ticks
        Ticks = 0
    EndIf
    Ticks = Ticks+1
    DrawText "FPS:" + LastTicks, 100,100
    Flip
Until AppTerminate() Or KeyHit(KEY_ESCAPE)

when I try it with a non existing MODE like 30Hz:
Graphics 640,480,32,30....it returns also 60!. So the graphics mode must exist.
Did you try to list all avaiable Graphic modes and check whether 640x480 at 60Hz is avaiable on your machine?
SuperStrict
SetGraphicsDriver GLMax2DDriver()
Graphics 640,480,32,30
Global TimeStamp:Int, Ticks:Int, LastTicks:Int
For Local i:Int=0 Until CountGraphicsModes()
    Local width:Int  , height:Int , depth:Int , hertz:Int
    GetGraphicsMode  i, width, height, depth, hertz
   
    Local text:String= "mode " + i  + ":    W=" + width + "   H=" + height + "    D=" + depth + "   Hz=" + hertz
    Print text
Next
Well... It was a problem with the driver of the PC I was using, I still can't solve it, but I've tried it on other computers and the FPS crash hasn't occurred under the conditions I mentioned. So thanks for the tips, now it's time to make a beautiful fire and buy a new PC :o [Solved]
R.-
== The tRick is that there is no tRick ==