[squeak-dev] Opengl and Squeak

Lawson English lenglish5 at cox.net
Thu Aug 16 20:07:27 UTC 2012


thanks Hans-Martin. I'll update my videos with that bit of info too.

I have been playing quite a bit with NativeBoost lately and it offers 
some very nice features that anyone wanting to make a game or other 
realtime-ish application will find beneficial, including the ability to 
create a "cascade" of foreign file calls within a single method, or even 
program a bit of custom x86 assembler. I don't know what will be 
involved to port it to Squeak, but Igor's talk suggests that the only 
"special" bit is already present in the VM, which should work with 
either Pharo or Squeak. The rest is just glue code at the Smalltalk 
level, which means that it is perfectly doable to get it working on 
Squeak, in theory at least.

Native boost also offers a way of passing an arbitrary  ByteArray to an 
external function as though it were a normal pointer to a bit of 
malloc-ed memory, which can be VERY useful with certain libraries, that 
and the ability to actually malloc memory for a ByteArray from the OS 
level heap, opens up all sorts of possibilities like having an external 
lib render directly into a BitMap object asynchronously from its own OS 
level thread so that each update can show the library's progress in a 
morph without any further coding.

I'm actually working on a simple MandelBrot Set generator lib in C to 
demo this.

L.



On 8/16/12 12:38 PM, Hans-Martin Mosner wrote:
> The Squeak OpenGL bindings are on squeaksource.com. Here is an older 
> mail exchange describing the installation procedure: 
> http://forum.world.st/OpenGL-in-4-1-or-later-td3794639.html I have 
> just tried it in a 4.3 image, and after fixing three small glitches it 
> worked: - somehow the method OGLUnix>>#openGLLibraryName has an 
> illegal character at the end (it's probably being handled as 
> whitespace in other Squeak/Pharo images) - the method Point>>#area 
> does not exist. I implemented it as returning x*y, which works. - the 
> method printShowingMaxDecimalPlaces: does not exist. I used 
> printString instead. That should get you started. Cheers, Hans-Martin 


-- 
Squeak from the very start (introduction to Squeak and Pharo Smalltalk for the (almost) complete and compleate beginner).
https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all



More information about the Squeak-dev mailing list