本文整理汇总了C++中SkyBox::Create方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyBox::Create方法的具体用法?C++ SkyBox::Create怎么用?C++ SkyBox::Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyBox
的用法示例。
在下文中一共展示了SkyBox::Create方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetupScene
void SetupScene() {
//hField.Create(heightmapFile, heightmapTexture, 256, 256);
hField.Create(heightmapTexture);
char* SkyBoxTextures[6] = {"Data/textures/skybox/front.tga", "Data/textures/skybox/back.tga", "Data/textures/skybox/left.tga", "Data/textures/skybox/right.tga", "Data/textures/skybox/up.tga", "Data/textures/skybox/down.tga" };
sbox.Create(SkyBoxTextures);
camera = OpenGLCamera(real3(50,10,10), real3(50, 1, 20), real3(0, 1, 0),0.5);
//create enemy tanks
for (int i = 0; i < 4; i++) {
tanks[i] = new Tank(turretmodelFile, turrettextureFile, 2, Vec3(30+(10*i), 0, 50));
tanks[i]->setRotation(Vec3(0, 270, 0));
scene->AddObject(tanks[i]);
}
Crate *crates[50];
for (int i = 0; i < 15; i++) {
crates[i] = new Crate(Vec3(65, 1, 30+(2*i)), Vec3(0, 0, 0));
scene->AddObject(crates[i]);
}
for (int i = 15; i < 30; i++) {
crates[i] = new Crate(Vec3(25, 1, (2*i)), Vec3(0, 0, 0));
scene->AddObject(crates[i]);
}
for (int i = 30; i < 50; i++) {
crates[i] = new Crate(Vec3((2*i)-34, 1, 61), Vec3(0, 0, 0));
scene->AddObject(crates[i]);
}
//player setup
player = new Tank(tankmodelFile, tanktextureFile, 2, Vec3(50, 0, 25));
player->setPlayer();
player->initKeyboard();
scene->AddObject(player);
//setup hud
text[0] = new Font("Health: ", Vec3(50, 20, 0));
text[1] = new Font("Score: ", Vec3(650, 20, 0));
text[2] = new Font("FPS: ", Vec3(50, 550, 0));
glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );
}