[squeak-dev] Opengl and Squeak

David T. Lewis lewis at mail.msen.com
Fri Aug 17 22:13:14 UTC 2012


Hello Dimitris,

I do not know much about GL, but I have some experience with interfacing
Squeak to external libraries. I would suggest that you consider developing
your interface in the form of a VM plugin, rather than relying on any of
the FFI interfaces. It is a little more work to get started doing it this
way, but in the long run the result will be much more reliable, portable,
and maintainable than anything you could do with FFI calls.

If you are interested in doing this I'll try to give some help and pointers.

Dave


On Fri, Aug 17, 2012 at 07:51:14AM +0100, dimitris chloupis wrote:
> Well if FFI works okish in squeak I dont have a need for nativeboost, since I prefer to code in smalltalk than assembly.?
> 
> I decided to continue my project 'Ephestos' is squeak, since Blender python has been a complete failure, the opengl implementation is buggy , still stuck to version 1.1 and it consumes CPU cycles like crazy (simple hand morph system ?consume 50% of my dual core) so fingers crossed it will works with squeak. I dont care for fancy features like nativevboost if its buggy, non cross platform and slow.?
> 
> Seems I am not getting replies from other than you lawson , I assume something is wrong with my squeak-dev subscription.?
> 
> Anyway, will test FFI from CroquetGL and hopefully it will work for me too.Thanks for the help.?
> 
> ________________________________
>  From: Lawson English <lenglish5 at cox.net>
> To: squeak-dev at lists.squeakfoundation.org 
> Sent: Thursday, 16 August 2012, 23:07
> Subject: Re: [squeak-dev] Opengl and Squeak
>  
> 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