To visualize objects in a world CryENGINE defines the concept of render nodes and render elements. Render nodes represent general objects in the 3D engine. Among other things they are used to build a hierarchy for visibility culling, allow physics interactions (optional) and rendering.
For actual rendering they add themselves to the renderer (with the help of render objects as you can see in the sample code below) passing an appropriate render element which implements the actual drawing of the object.
Creating a new render node
The following example render node is called PrismObject.
It needs to derive from IRenderNode defined in:
Add the interface for IPrismObjectRenderNode to CryEngine/CryCommon/IEntityRenderState.h to make it publicly available
Add a new enum to the list of already defined render nodes in CryEngine/CryCommon/IEntityRenderState.h
Add !PrismObjectRenderNode.h to !Cry3DEngine
Add !PrismObjectRenderNode.cpp to !Cry3DEngine
To allow client code to create an instance of the new render node extend the following function in Code/CryEngine/Cry3DEngine/3DEngine.cpp