Page 1 of 1

[PB 4.30 b4] Problem with screen refresh

Posted: Sat Nov 22, 2008 9:49 pm
by lethalpolux
Hello here :)
i've a little problem with refresh of screen.. with flipbuffers() with option 1 or 2 or nothing it's the same... i can see a big tearing ( refresh line in fact ) who break objects..it's like the screen synchronisation is off..
how can i solve this?


edit to fred:
you solve this and you find a trick to put a usebuffer command in 4.30 with dx9 and you have the best language never made :wink:

Posted: Sat Nov 22, 2008 10:48 pm
by Comtois
yes screen synchro doesn't work

i made a snippet to test screen synchro
With 4.20 , frame rate is 60 ok (it's my screen frequency)
With 4.30 , using dx7 frame rate is 60 ok
With 4.30 , using dx9 frame rate is 2000 nok

Code: Select all

InitEngine3D()
InitSprite()
InitKeyboard()
OpenWindow(0,0,0,800,600,"Test",#PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0),0,0,800,600,0,0,0)

Repeat
  event = WindowEvent()
  ClearScreen(0)
  SetWindowTitle(0,StrF(Engine3DFrameRate(#PB_Engine3D_Current),2))
  RenderWorld()
  FlipBuffers()
  ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape) Or event=#PB_Event_CloseWindow

Posted: Sat Nov 22, 2008 11:28 pm
by Ollivier
Isn't it a problem in the 64bits version?

[Edit] @comtois
With XP and 32 bits I have a good result (Near 60Hz)

Posted: Sun Nov 23, 2008 10:26 am
by Comtois
Ollivier wrote:Isn't it a problem in the 64bits version?

[Edit] @comtois
With XP and 32 bits I have a good result (Near 60Hz)
i have XP and 32 bits :shock:

Nvidia Geforce 6800, i will check my driver !


to be sure of your result, is it with the subsystem directx9?

Posted: Sun Nov 23, 2008 3:00 pm
by Comtois
I updated drivers, and I always have the problem with directx9,
Am I alone?

Posted: Sun Nov 23, 2008 3:29 pm
by nco2k
i have the same problem with your example and iirc SetFrameRate() doesnt work with DX9 either.

c ya,
nco2k

Posted: Sun Nov 23, 2008 3:40 pm
by Michael Vogel
Got the following values for Engine3DFrameRate() here...

SetFrameset(1) -> 4.00
SetFrameset(5) -> 12.00
SetFrameset(10) -> 22.00
SetFrameset(20) -> 42.00

...so it looks like the rate equals frameset*2+2 !