[Vm-dev] Patches to SqueakFFIPrims and FFI-Kernel to support "manual surfaces"

Josh Gargus josh at schwa.ca
Sat Jan 30 18:27:00 UTC 2010


Hi,

Here's a zip file that contains patches to SqueakFFIPrims (both Slang and C support files) and FFI-Kernels in order to support "manual surfaces", as embodied in the new class ExternalForm.  There's a README in the zip file that describes how the changes fit together, so here I'll just describe the goal.

The intent is to have a subclass of Form, ExternalForm, that uses an arbitrary pointer as the location of its pixel-data.  It achieves this by acting as a client of SurfacePlugin much like any other, with the added twist of a primitive that enables Squeak code to set/clear the pointer.  This is useful when working with such APIs as OpenGL and OpenCL, which provide a "map-image" API for interacting with images which reside in GPU memory.  For example, if you want to access the updated contents of an OpenCL image, you would call clEnqueueMapImage().  This returns a pointer to CPU-accessible memory; by using this as the pointer for an ExternalForm, we can seamlessly use the OpenCL image just like any other Squeak Form.

Cheers,
Josh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PatchesForExternalForm.zip
Type: application/zip
Size: 19361 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100130/fa679b92/PatchesForExternalForm-0001.zip


More information about the Vm-dev mailing list