meta data for this page
  •  

Introduction to the reference application

The purpose of the reference application is to provide an example of how to use the SpeedTree SDK.

All source files prefixed with “My” indicate an example implementation meant to detail what an application might (and, in a lot of cases, should) do when interfacing with the SpeedTree SDK. These files constitute the bulk of the reference application and are not part of the official SDK; they are merely examples or “reference” implementations.

Most of the code in the reference application is dedicated to feeding the following data to the SDK:

  • Forest population, both random and by .stf files
  • Terrain population via an example height map class
  • Grass population using a procedural system

The other main parts of the reference application are as follows:

  • The actual render loop
  • Mouse, keyboard, and gamepad controls
  • Gathering and printing rendering statistics
  • Extracting the user configuration from the given .sfc (SpeedTree Forest Configuration) 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, executable is at [SDK]/SDK/Bin/Reference Application Launcher.exe). The .sfc syntax is not part of the SDK, but a handy mini-language our developers use to build example forests. SDK users can use it for experimentation and running their own art assets through the reference application.

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