Displaying directly on Display

Dan Ingalls Dan at SqueakLand.org
Fri Mar 28 20:01:08 UTC 2003


Check out DisplayScreen forceToScreen: and related methohds.  Things are optimized in the VM so that many little BLTs can happen in Squeak, and then one single one copies them out to the "real" display.

Jon Hylands <jon at huv.com>  wrote...

>Hi everyone,
>
>A friend of mine is trying to write an app that will flash something on the
>screen for a small number of milliseconds (variable - between say 50 and
>300 ms).
>
>We wrote some code that does it, but with the delay in between displaying
>this box anything less than about 180 ms, it doesn't actually appear on the
>display.
>
>Basically, he's got a Form, say about 150 x 120 in size, and is doing
>something like this:
>
>	firstForm displayOn: Display at: 100 @ 100.
>	(Delay forMilliseconds: 3000) wait.
>	secondForm displayOn: Display at: 100 @ 100.
>	(Delay forMilliseconds: 100) wait.
>	firstForm displayOn: Display at: 100 @ 100
>
>So, we get the first form for 3 seconds, and then the second form is
>supposed to appear for say 100 ms, and is then replaced by the first form
>again.
>
>The problem is the form doesn't actually show up on the screen at all. Is
>there some background process that is gathering copyBits calls in the VM
>and then only updating the screen once in a while?
>
>I know we can do this using the #step function and a morph, but right now
>we've already implemented it this way without Morphic, and I'd love to know
>what the problem is...
>
>BTW, he's running 3.4, with the display depth set to 16 bits, running on
>Windows NT. I tried the same thing on my laptop, running XP, and got the
>same behavior...
>
>Later,
>Jon
>
>--------------------------------------------------------------
>   Jon Hylands      Jon at huv.com      http://www.huv.com/jon
>
>  Project: Micro Seeker (Micro Autonomous Underwater Vehicle)
>           http://www.huv.com



More information about the Squeak-dev mailing list