Small Intro - Thanks for PB v4 (bughunting version added)

Developed or developing a new product in PureBasic? Tell the world about it.
Jan Vooijs
Enthusiast
Enthusiast
Posts: 196
Joined: Tue Sep 30, 2003 4:32 pm
Location: The Netherlands

Post by Jan Vooijs »

va!n wrote:
Jan Vooijs wrote: Note the " WaitWindowEvent( 2)" and removal of "; ClearScreen(0)" and the "Delay(1)". But the program stops if the mouse is NO longer on the window (side effect)... :lol: This version runs about 30% and still NO stutter!!! I even can play a DVD while this litle demo version runs...

Hope this helps....
What should WaitWindowEvent(2) do??? This command dont use/need any arguments! So i dont understand the "2"... In the original effect code i dont used any ClearScreen(), because the complete screen will be redrawed each frame, so i didnt used ClearScreen() .. Delay(1) was used because i dont wanted 100% CPU ussage...
In PB4 it uses a parameter to indicate a "waint untill" time almost the sam e in the delay() function but goes really back to windows. But using the WaitWindow() function the usage drops from 100% to around 30% meaning the delay() uses 70% of the time?!?! I suspect the delay() is "in house" so cpnsuming all the proccessor cycles... Will research more, later...
Life goes to Fast, Enjoy!!

PB 4 is to good to be true, wake up man it is NOT a dream THIS is a reality!!!

AMD Athlon on 1.75G, 1Gb ram, 160Gb HD, NVidia FX5200, NEC ND-3500AG DVD+RW and CD+RW, in a Qbic EO3702A and Win XP Pro SP2 (registered)
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

va!n wrote:yes... possible TimeGetTime_ is the result of not running smooth??
are you calling TimeBeginPeriod_(1) (I think that's the correct function?) before your main loop? otherwise TimeGetTime_() may not return the time with millisecond accuracy.
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Maybe the problems on the AMD X2 are coming from the problems they have with measuring time when speedstep is active, you could test without....
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

Since I have overclocked my X2 I don't have Cool'N'Quiet activated.
The Human Code Machine / Masters' Design Group
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post by djes »

Maybe the new flipbuffer argument (2) correct this. I think this is this function that have to wait for synchro (1) without taking extra cycles, and not some tricks made by ourself.

I've tried flipbuffers(3), and it seems that it is timer based with synchro activated (and it looks like a triple buffering). However, it's a bit slower than just flipbuffers(1) when sync is activated in gfx card drivers.
Post Reply