Ok. Here
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 0 );
dbSetCameraRange ( 1.0f, 30000.0f );
dbLoadImage ( "texture.jpg", 1 ); //load the heightmap texture
dbLoadImage ( "detail.jpg", 2 ); //load the heightmap detail
dbSetupTerrain ( );
dbMakeObjectTerrain ( 1 );
dbSetTerrainHeightMap ( 1, "map.bmp" ); //loads heightmap
dbSetTerrainScale ( 1, 3.0f, 0.6f, 3.0f );
dbSetTerrainLight ( 1, 1.0f, -0.25f, 0.0f, 1.0f, 1.0f, 0.78f, 0.5f );
dbSetTerrainTexture ( 1, 1, 2 );
dbBuildTerrain ( 1 );
dbPositionCamera ( 385, 23, 100 );
while ( LoopGDK ( ) ) //main game loop
{
dbControlCameraUsingArrowKeys ( 0, 2.0f, 2.0f );
float fHeight = dbGetTerrainGroundHeight ( 1, dbCameraPositionX ( ), dbCameraPositionZ ( ) );
dbPositionCamera ( dbCameraPositionX ( ), fHeight + 10.0f, dbCameraPositionZ ( ) );
dbUpdateTerrain ( );
dbSync ( );
}
}
TheNeo is the one... YEAH!!!!