[squeak-dev] Re: [Pharo-project] Offscreen drawing...
Lawson English
lenglish5 at cox.net
Tue Aug 25 07:33:47 UTC 2009
Andreas Raab wrote:
> Lawson English wrote:
>> It would be very kool to have Squeak/Croquet able to render into SL
>> the same way. Smalltalk on a prim...
>
> This is actually utterly trivial. What you are looking for is in the
> SurfacePlugin. It allows to map external bitmaps into Squeak and to
> draw directly into it. The B3D engine uses this to do mixed-mode
> rendering in Direct3D; i.e., exposing the D3D rendering target to
> drawing operations in Squeak.
>
> Example code for the surface plugin can be found here:
>
> http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins/ExampleSurfacePlugin/
>
>
> The example uses a malloc()ed region of memory; you can use shared mem
> or whatever. Once you've created a form in this way all you need is to
> just BitBlt right onto it, or even better, just set it as Squeak's
> Display variable and all drawing will go onto it.
>
> Cheers,
> - Andreas
>
>
Thanks Andreas. I'd already seen that but for some reason the brain
hasn't been functioning well lately. Sighs. Hopefuly a few hours sleep
will show me how to convert Helloworld to hello world, which is about
all that needs to be done :-/
Lawson
More information about the Squeak-dev
mailing list
|