本文整理汇总了C++中SkyBox::displaySkybox方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyBox::displaySkybox方法的具体用法?C++ SkyBox::displaySkybox怎么用?C++ SkyBox::displaySkybox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyBox
的用法示例。
在下文中一共展示了SkyBox::displaySkybox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderFun
// this is the render function. It contains flags to set up the differnt shaders and what
// to draw. One can remove most of is not all of theem
void renderFun() {
// DEBUGGING FLAGS
static int drawTri = 1;
static int drawSkybox = 1;
static int drawLines = 0;
static Vector3f pos=Vector3f(0,0,100);
static Vector3f lookat=Vector3f(0 ,0 ,0);
static Vector3f up=Vector3f(0,1,0);
static int zoom = -70;
static int camZoom = 1;
static int setCam = 0;
// setting up the camera manually if needed
// can be remved
if (setCam) {
cam.setCamera(pos, lookat, up);
setCam = 0;
}
// setting up the camera zoom manually if needed
// can be remved
if (camZoom) {
cam.zoomIn(zoom);
camZoom = 0;
}
// setting opengl - clearing the buffers
glEnable(GL_DEPTH_TEST); // need depth test to correctly draw 3D objects
glClearColor(1.0,1.0,1.0,1);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
if (drawSkybox) {
skybox.displaySkybox(cam);
}
if (drawTri) {
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
displayBoxFun(sphereBoxProg);
}
// if (drawLines) {
// glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
// displayBoxFun(sphereLinesBoxProg);
// }
glutSwapBuffers();
}