User Tools

Site Tools


Introduction

The purpose of the reference application is to provide an example of how to use the SDK to good effect. All source files prefixed with “My” indicate an example implementation, meant to detail what an application might (and, in most cases, should) do when interfacing with the SpeedTree SDK. These files constitute the bulk of the SpeedTree Reference Application and are not part of the official SDK, but merely example or “reference” implementations. Most of the code in it is dedicated to feeding the SDK data:

  • Forest population, both random and by SWA & STF files.
  • Terrain population via an example height map class.
  • Grass population using a random generation & image-based mask system.

The other main parts of the reference application are:

  • Extracting the user configuration from the given SFC file (which has a considerable number of options) and passing them into the SDK. Example SFC files are shown in the Reference App Launcher application (screenshot below). SFC syntax is not part of the SDK, merely an handy mini-language IDV uses to build example forests. SDK users can use it for experimentation and running their own art assets through the reference application.

  • The actual render loop.
  • Mouse, keyboard, and gamepad controls.
  • Gathering and printing rendering statistics.

In the figure below, the reference application serves as an example of one of the green application boxes.