[squeak-dev] Double-buffering using Display and BitBlt

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Double-buffering using Display and BitBlt

Michael van der Gulik-2

How do you do double-buffering using Display and BitBlt?

Is there a trick related to deferUpdates:? Or is it not really supported or supported using some other plug-in?

Gulik.

--

http://gulik.pbwiki.com/


Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Double-buffering using Display and BitBlt

Andreas.Raab
Michael van der Gulik wrote:
> Is there a trick related to deferUpdates:? Or is it not really supported
> or supported using some other plug-in?

Yes, there is a trick. Compare these two:

1 to: 1000 do:[:i|
        Display getCanvas line: i@0 to: i@500 width: 1 color: Color black.
].

vs. (after doing a restore display):

Display deferUpdates: true.
1 to: 1000 do:[:i|
        Display getCanvas line: i@0 to: i@500 width: 1 color: Color black.
].
Display forceToScreen: Display boundingBox. "way too much but hey..."

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Double-buffering using Display and BitBlt

Michael van der Gulik-2


On Tue, Mar 17, 2009 at 9:00 PM, Andreas Raab <[hidden email]> wrote:
Michael van der Gulik wrote:
Is there a trick related to deferUpdates:? Or is it not really supported or supported using some other plug-in?

Yes, there is a trick. Compare these two:

1 to: 1000 do:[:i|
       Display getCanvas line: i@0 to: i@500 width: 1 color: Color black.
].

vs. (after doing a restore display):

Display deferUpdates: true.
1 to: 1000 do:[:i|
       Display getCanvas line: i@0 to: i@500 width: 1 color: Color black.
].
Display forceToScreen: Display boundingBox. "way too much but hey..."


Thanks, Andreas. I'm not sure if it's double-buffering, but it achieves the same goal.

In other news, my image causes the VM to do a segmentation fault on startup. I'll work out if that's from stupidity or a legitimate bug tonight.

Gulik.

--
http://gulik.pbwiki.com/