Initializing tree graphics
To load the textures and initialize the vertex and index buffers of a CTree object, call CTreeRI::InitGfx().
Read time 1 minuteLast updated 2 hours ago
Note the hierarchy of the tree classes:

In reference to the above diagram:
-
is defined in the Core library.
CCore -
is used as an alias for
CTreeinCCore.Include/SpeedTree/Forest/Forest.h -
is a templated class in need of platform-specific rendering policies.
CTreeRI -
"Render Policies" represents the render policies (textures, shaders, vertex buffers, etc) for any of the supported SpeedTree platforms.
-
is defined in each of the platform's renderer header files (e.g. OpenGLRenderer.h) and is a
CTreeRenderobject with the appropriate render policies passed in as template parameters.CTreeRI
The typical order for initializing a tree object is:
-
Load an .stsdk file or memory block into aobject using
CTreeRI(CTreeRI::LoadTree()is derived fromCTreeRI).CCore -
Callof that tree object so that it will be ready to render using the Render Interface library.
CTreeRI::InitGfx()