GlutRender.cpp: fix tab indentation
This commit is contained in:
parent
7e797980ac
commit
b614979c7a
1 changed files with 10 additions and 10 deletions
|
@ -49,21 +49,21 @@ void GlutRender::run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlutRender::reshape(int wid, int hei) {
|
void GlutRender::reshape(int wid, int hei) {
|
||||||
if (hei == 0)
|
if (hei == 0)
|
||||||
hei = 1;
|
hei = 1;
|
||||||
GLfloat aspect = (GLfloat)wid / (GLfloat)hei;
|
GLfloat aspect = (GLfloat)wid / (GLfloat)hei;
|
||||||
|
|
||||||
glViewport(0, 0, wid, hei);
|
glViewport(0, 0, wid, hei);
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
// Enable perspective projection with fovy, aspect, zNear and zFar
|
// Enable perspective projection with fovy, aspect, zNear and zFar
|
||||||
gluPerspective(45.0f, aspect, 0.1f, 100.0f);
|
gluPerspective(45.0f, aspect, 0.1f, 100.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlutRender::display() {
|
void GlutRender::display() {
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
|
||||||
// Camera position and orientation
|
// Camera position and orientation
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
@ -91,7 +91,7 @@ void GlutRender::display() {
|
||||||
glEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlutRender::reshape_handle(int wid, int hei) {
|
void GlutRender::reshape_handle(int wid, int hei) {
|
||||||
|
|
Loading…
Reference in a new issue