[squeak-dev] [ANN] Croquet OpenGL on Squeaksource (Re: Trying to
load ALienOpenGL into 4.1 alpha...)
bert at freudenbergs.de
Mon Mar 29 23:54:16 UTC 2010
On 30.03.2010, at 01:47, Ross Boylan wrote:
> On Mon, 2010-03-22 at 23:04 -0700, Andreas Raab wrote:
>> On 3/22/2010 7:27 PM, Lawson English wrote:
>>> Croquet OpenGL is dependent on all sorts of things. Have you managed to
>>> get Croquet working in a modernish version of Squeak/Pharo?
>> (you will need an updated 4.1 trunk image - I've promoted
>> Form>>flipVertically to core in the process of making this package)
>> From http://www.squeaksource.com/CroquetGL
>> The OpenGL interface from Croquet for consumption in other contexts.
>> Supports OpenGL 1.4 plus extensions.
>> To install, first load the FFI via:
>> (Installer repository: 'http://source.squeak.org/FFI')
>> install: 'FFI-Pools';
>> install: 'FFI-Kernel';
>> install: 'FFI-Tests'.
>> then load CroquetGL:
>> (Installer repository: 'http://www.squeaksource.com/CroquetGL')
>> install: '3DTransform';
>> install: 'OpenGL-Pools';
>> install: 'OpenGL-Core'.
>> When everything has loaded, try the example:
>> OpenGL example.
>> Important Windows Note:
>> In order to use Croquet on Windows, you must make sure your VM is set to
>> support OpenGL instead of D3D by default. To do this, press F2 or go to
>> the system menu, into the "Display and Sound" section and ensure the
>> preference "Use OpenGL (instead of D3D" is ENABLED.
>> - Andreas
> I have a couple of questions about this.
> First, I thought a lot of the OGL in squeak code required a special vm
> to understand a C style syntax for function calls.
No. The VM does not know anything about syntax.
> So how can this
> work? Possibilities:
> 1) 4.1 requires a new VM, and that VM has the feature enabled
> 2) existing squeak VM's support it
> 3) Croquet code uses that syntax, but it's not in the image. ogl
> calls should be conventional smalltalk style.
> 4) ....?
The compiler (which deals with syntax) is written in Smalltalk. You can have any syntax you like. Croquet experimented with this. But it does not have anything to do with the VM.
> Second, does the later message
>> Yeah, I was wondering why it's so much slower in trunk than in our
>> internal images or Croquet. First I thought it's the JIT but then I
>> looked at a profile and found EventSensor>>wait2ms called from
>> places in EventSensor and indirectly via Sensor anyButtonPressed .
> imply that performance will be painful?
> I'm interested in this partly because Croquet is using lots of CPU when
> I try it. Since I don't need shared spaces, I was hoping something
> lighter weight would avoid the problem.
This is just a raw way to interface with OpenGL. To be really useful you will have to write a 3G engine on top of it.
> And at least it has a VM with a known build procedure.
- Bert -
More information about the Squeak-dev