Here is a high-level introduction to using vtlib to render your terrain data.
- Prepare your data.
You should have, at the minimum, elevation data.
- Put the data in the correct location.
BT, ITF, and Tileset .ini files should be put in a folder called "Elevation" under your data directory.
Imagery should be in a folder "GeoSpecific" under your data directory.
- Create a set of parameters describing your terrain.
An easy way is to copy one of the sample files, found in <datapath>/Terrains
These are plain text files which are easy to edit.
E.g. call yours "MyTerrain.xml". Edit it to contain the filenames of your own data.
- Make sure the necessary directories on are your include path. If you compiled vtlib, then you already have everything set up to compile applications on top of it.
Your application will create the OpenGL context. vtlib will simply draw into the current context each frame.
vtScene *pScene = vtGetScene();
vtTerrainScene *ts = new vtTerrainScene;
vtGroup *top = ts->BeginTerrainScene();
vtTerrain *pTerr = new vtTerrain;
vtTerrainFlyer *pFlyer = new vtTerrainFlyer(1.0f);