Initializing tree graphics

To load the textures and initialize the vertex and index buffers of a CTree object, call CTreeRI::InitGfx(). Note the hierarchy of the tree classes:

diagram_sdk_render_policies.jpeg

The typical order for initializing a tree object is:

  1. Load an STSDK file or memory block into a CTreeRI object using CTreeRI::LoadTree() (CTreeRI is derived from CCore).

  2. Call CTreeRI::InitGfx() of that tree object so that it will be ready to render using the Render Interface library.

Note: The source files MyPopulate.cpp/h give an example of how to load trees and initialize their graphics. Specifically, see CMyPopulate::LoadBaseTree() and CMyPopulate::InitBaseTreeGraphics().