Hi,
RenderPeer is a binding-independent abstraction layer which is responsible for creation of binging-specific CanvasPeer and associating binding-specific Shader implementations with cross-binding Shader info containers.
Example [all examples are given for JOGL]:
RenderPeerImpl creates CanvasPeerImpl and associates JOGL-specific PolygonAttrShaderPeer with cross-binding PolygonAttrShader. Cross-binding PolygonAttrShader does nothing except holding polygon attributes for specific rendering state, and does not perform any rendering. PolygonAttrShaderPeer accepts PolygonAttrShader as a parameter to its shade(…) method and performs actual changes of context state using GL API calls provided by JOGL. In short words, PolygonAttrShader holds information about polygon params, and PolygonAttrShaderPeer performs actual manipulation of GL context (say, drawing).
Now coming to CanvasPeer. CanvasPeer is an abstract representation of GL rendering context in Xith3D. CanvasPeerImpl is resopnsible for binging-specific context initialization (for JOGL, it creates GLCanvas), rendering process initialization (setting global GL state parameters) and actual rendering process.
Canvas3D is a connection mechanism between SceneGraph root (View in your example) and actual GL canvas (CanvasPeerImpl). Canvas3D is here primarily for compatibility with Java3D.
When you call View.renderOnce(), this causes traversing scenegraph and preparing multiple Atoms (shapes) and Shaders (shape attributes, aka rendering states), placing them in appropriate rendering pass queues (aggregated as RenderFrame), state sorting and calling display(RenderFrame) of CanvasPeerImpl.
After that, CanvasPeerImpl iterates over atom queues (lists) and draws them by calls to binding-specific AtomPeers and ShaderPeers provided by RenderPeerImpl.
That’s generally all.
If you need more details, let me know.
Yuri
P.S. Once we will need developer docs and explanations on how Xith3D works…