fix push & pop matrix
This commit is contained in:
@@ -58,9 +58,10 @@ void pre_render() {
|
||||
}
|
||||
|
||||
void render() {
|
||||
entityList.getSkybox()->render();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
entityList.getCamera()->render();
|
||||
glTranslatef(0.0f, 0.0f, 0.0f);
|
||||
entityList.getSkybox()->render();
|
||||
glPushMatrix();
|
||||
glBegin(GL_QUADS);
|
||||
glColor3f(1,0.5,1);
|
||||
@@ -101,7 +102,6 @@ void render() {
|
||||
glVertex3f(-0.5f, -0.5f, 0.5f);
|
||||
glEnd();
|
||||
glPopMatrix();
|
||||
glPushMatrix();
|
||||
|
||||
|
||||
//glBegin(GL_QUADS);
|
||||
|
@@ -94,8 +94,6 @@ public:
|
||||
}
|
||||
|
||||
void render() {
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
//glTranslatef(-position.x, -position.y, -position.z);
|
||||
// up vector
|
||||
glRotatef(-angles.x,1.0f, 0.0f, 0.0f);
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
glColor3f(1,0,0);
|
||||
glTranslatef(position.x,position.y+10,position.z);
|
||||
glBegin(GL_QUADS);
|
||||
glColor3f(1,0.5,1);
|
||||
glColor3f(1,0,0);
|
||||
// Front face
|
||||
glVertex3f(-0.5f, -0.5f, 0.5f);
|
||||
glVertex3f(0.5f, -0.5f, 0.5f);
|
||||
|
Reference in New Issue
Block a user