|
|
我想在自己的程序里显示地形,直接用了《学OpenGL编3D游戏》》里的baiscobj类,
也stdafx.h在定义了:
#define MAP_W 32 // size of map along x-axis 32
#define MAP_SCALE 24.0f // the scale of the terrain map
#define MAP MAP_W*MAP_SCALE/2
#define KEY_DOWN(vk_code)((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
#define RAND_COORD(x) ((float)rand()/RAND_MAX * (x))
#define FRAND (((float)rand()-(float)rand())/RAND_MAX)
下面图象是调用了
DisplayScene()
DrawSand()
CreateSkyBox(3, 6, 3, 6)
后的结果
[em6] |
|