[PB 4.30 b4] Problem with screen refresh

Just starting out? Need help? Post your questions and find answers here.
lethalpolux
Enthusiast
Enthusiast
Posts: 171
Joined: Sun Jun 08, 2003 10:50 pm
Location: France
Contact:

[PB 4.30 b4] Problem with screen refresh

Post 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:
Pol.
Intel Core2Duo 6600 - 3Gb DDR2 - Geforce8800Gts - Vista Home Premium 32bits
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post 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
Please correct my english
http://purebasic.developpez.com/
Ollivier
Enthusiast
Enthusiast
Posts: 281
Joined: Mon Jul 23, 2007 8:30 pm
Location: FR

Post 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)
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post 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?
Please correct my english
http://purebasic.developpez.com/
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

I updated drivers, and I always have the problem with directx9,
Am I alone?
Please correct my english
http://purebasic.developpez.com/
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

i have the same problem with your example and iirc SetFrameRate() doesnt work with DX9 either.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
Michael Vogel
Addict
Addict
Posts: 2811
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post 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 !
Post Reply