Example: Basic Rendering

The Shared Substance standard library includes an integration with Apple's Cocoa graphical toolkit.

Under the environments folder in the Shared Substance svn you will find a folder named CoreAnimationRenderNode This is an environment that integrates with the Cocoa and Core Animation graphical toolkit for rendering a simple graphical scene graph. For this example you will need to build the Cocoa integration (see Installation).

A render node is a simple environment that when booted shares itself on the network with a handler for replicating a scenegraph. To launch a render node go to the CoreAnimationRenderNode folder and run the following command

./run.sh Renderer1 1680 1050

This will launch a renderer named Renderer1 that can display an area of 1680x1050 pixels of the scene graph.

In the following example we create an environment that connects to the renderer and sets up a simple webserver where images can be added to the scenegraph.

To run the example run the renderer as describe above and then run the scenegraph environment from examples/basic_rendering

python main.py

To add an image to the scene graph go to http://localhost:3444 and type in the (full) URL of an image

Direct link to the files in the SourceForge SVN repository