Yes, a vsync() function would be very nice. ;)
I wouldn't advice such things until you feel a lot more comfortable, but there is a
way to program WinScreenLock directly under OS
3.1, provided you look at which CPU and graphics chip the device has. For an example
of this, I recommend the Motorola mnuals to
the 68328 series and the source code to the game argonv.
Such a route is only practical at all because the number of existing OS 3.1 devices is
small and shrinking. If people began
manufacturing new OS 3.1 devices it would get too difficult to write drivers for them
all.
Daniel Morais wrote:
> Hi !
>
> Mardi 13 Mars 2001 02:41, Chris Yourch a écrit:
>
> > Is there a way to simulate what WinScreenLock does under 3.5? I would like
> > to be able to stop all drawing to the screen somehow.
>
> WinScreenLock does not really stop all drawing.
> Think of it as a way to manage 2 screens windows, both located in video RAM.
> WinScreenLock allow you to draw offscreen ( on the undisplayed screen ) and
> WinScreenUnlock switch these 2 screens ( using hardware flipping ), making
> visible the screen where you was drawing, and making 'drawable' the one which
> is now not visible, alowing you ( in theory ) to do nice animations.
>
> Unfortunately, the hardware flipping process occur when you call the function
> WinScreenUnlock, which mean at any moment, without taking care of the video
> sync, and the result is that if do do very fast screen flipping, you can
> 'see' both screens at the same moment, if the flipping occur when the
> 'electron beam' was at the middle of the screen...
>
> It will be nice to have a function allowing to sync with the refresh, to
> avoid all these visual 'artifacts'.
>
> If you want to simulate WinScreenLock function, just create an offscreen
> window, and make it the draw window using WinSetDrawWindow.
> This will make all of your drawing functions use your offscreen window.
> Then, to simulate WinScreenUnlock, just copy your offscreen window to the
> visible screen, by using for exemple WinCopyRectangle.
>
> Regards,
>
> --
> Daniel Morais
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/