From: Ash Tyndall Date: Sun, 9 Oct 2011 11:35:20 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=256fe1d2b7f846346d62488d5cf33c24d9244cc8;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index c7db7d9..6441466 100644 --- a/scene.c +++ b/scene.c @@ -498,8 +498,16 @@ void display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); - glTranslatef(0.0f,0.0f,-5.0f); // Move into the Screen 10.0 + glTranslatef(0.0f, 0.0f, 0.0f); + glBegin(GL_QUADS); + glVertex3f(-1.0f, 1.0f, 0.0f); + glVertex3f( 1.0f, 1.0f, 0.0f); + glVertex3f( 1.0f,-1.0f, 0.0f); + glVertex3f(-1.0f,-1.0f, 0.0f); + glEnd(); + + glTranslatef(0.0f,0.0f,-5.0f); // Move into the Screen 10.0 glutSolidTeapot(1); glutSwapBuffers(); @@ -530,11 +538,11 @@ int main(int argc, char **argv) { glutInitWindowSize(500, 500); glutCreateWindow("Scene Editor"); - glShadeModel(GL_SMOOTH); // Enables Smooth Shading - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black Background - glClearDepth(1.0f); // Depth Buffer Setup - glEnable(GL_DEPTH_TEST); // Enables Depth Testing - glDepthFunc(GL_LEQUAL); // The Type Of Depth Test To Do + glShadeModel(GL_SMOOTH); // Enables Smooth Shading + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black Background + glClearDepth(1.0f); // Depth Buffer Setup + glEnable(GL_DEPTH_TEST); // Enables Depth Testing + glDepthFunc(GL_LEQUAL); // the type glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations