Setvsync(1) not working in "Basic" mode

Started by Pfaber11, July 15, 2021, 17:55:31

Previous topic - Next topic

Pfaber11

Good news in that I now understand what is going on . If I use setwindowsize (1920,1080,0) and setvsync(1) in "Basic" mode everything is great , however if I use setwindowsize(1920,1080,1) for full screen in "Basic" mode with setvsync(1) then it will only give me 48 fps or there abouts . For some reason it doesn't work in full screen . I don't know why but I do know under what circumstances it does not behave correctly . so there we are it does work but only in windowed mode of any resolution but does not in full screen mode. This is only in "Basic" mode in "Advanced" it is fine . What I don't know is if anybody else has the same problem, if you do then please make me aware so I know and can post this on github TGC and explain the problem in more detail. I was thinking my computer was not upto it but am now sure it is a bug .
@ Qube . The reason I realized this is your code was not in full screen and mine was and that was the only difference I could see. Took a while to sink in though.


Well a year later I realized I should of put setvsync(0) which gives me 60 fps . I was using setvsync(1).
setvsync(0) = 60fps
setvsync(1) = 45fps
setvsync(2) = 30fps
setvsync(3) = 20 fps
setvsync(4) = 15 fps

The above is correct if you are using OpenGL
In Vulkan setvsync(1) is 60fps
Have a nice day.
And I forgot to mention Vulkan is way smoother than OpenGL on this laptop YMMV.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz
HP Desktop AMD 3700 16GB ram 2 GB graphics card windows 10