---
title: Initializing tree graphics
product: SpeedTree Runtime SDK
version: '10'
latest_version: '10'
status: This page documents version 10. The latest version is 10.
canonical: https://docs.unity.com/en-us/speedtree-runtime-sdk/10/initializing-tree-graphics
latest_url: https://docs.unity.com/en-us/speedtree-runtime-sdk/10/initializing-tree-graphics.md
last_updated: 2026-11-20
generated_at: 2026-11-20T20:13:22.683Z
locale: en-us
---

# 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:

![Workflow of the SpeedTree SDK library, render policy interface class, and platform-specific render policies](/api/media?file=speedtree-runtime-sdk/10/media/images/diagram_sdk_render_policies.jpeg)

In reference to the above diagram:

* `CCore` is defined in the Core library.

* `CTree` is used as an alias for `CCore` in `Include/SpeedTree/Forest/Forest.h`.

* `CTreeRI` is a templated class in need of platform-specific rendering policies.

* "Render Policies" represents the render policies (textures, shaders, vertex buffers, etc) for any of the supported SpeedTree platforms.

* `CTreeRender` is defined in each of the platform's renderer header files (e.g. OpenGLRenderer.h) and is a `CTreeRI` object with the appropriate render policies passed in as template parameters.

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()`.
