本文整理汇总了C++中SkyBox::Render方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyBox::Render方法的具体用法?C++ SkyBox::Render怎么用?C++ SkyBox::Render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyBox
的用法示例。
在下文中一共展示了SkyBox::Render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: display_callback
// display callback
void display_callback( void ){
if (gameOver == true){
drawGameOver();
}
CalculateFPS();
if (shoot == true) {
player->shoot(player->getRotation());
}
int current_window;
// retrieve the currently active window
current_window = glutGetWindow();
// clear the color and depth buffers
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
if (rmode == SELECT) {
startPicking();
}
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective( 70.0f, float(glutGet(GLUT_WINDOW_WIDTH))/float(glutGet(GLUT_WINDOW_HEIGHT)), 0.1f, 2000.0f );
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
camera.Update(hField.getHeight(camera.camera_pos.x, camera.camera_pos.z));
glPushMatrix();
glColor3f(1.0, 1.0, 1.0);
hField.Render();
sbox.Render(camera.camera_pos.x,camera.camera_pos.y,camera.camera_pos.z,1024,1024,1024);
scene->RenderObjects();
//player->setHeight(hField.getHeight(player.getPosition()[0], player.getPosition()[2]));
player->Render();
glPopMatrix();
// swap the front and back buffers to display the scene
glutSetWindow( current_window );
//PICKING
// for(int i = 0; i < 2; i++) {
// for(int j = 0; j < 2; j++) {
// glPushMatrix();
// glPushName(i*2+j);
// glTranslatef(i*3.0,0,-j * 3.0);
// glCallList(display_list);
// glPopName();
// glPopMatrix();
// }
// }
//draw HUD
drawHUD();
if (rmode == SELECT) {
stopPicking();
}
else {
if (gameOver == false)
glutSwapBuffers();
}
}