From 256fe1d2b7f846346d62488d5cf33c24d9244cc8 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Sun, 9 Oct 2011 19:35:20 +0800 Subject: [PATCH] --- scene.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) 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 -- 2.20.1