X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=b806a5feea6cad7e44b9b67923d3125c2e3367af;hb=aac655470229c3ae17b0ad78dead36b2000a3a67;hp=4852a51833bdab7c197ce2516440fde0c0f28159;hpb=71afe748d9068eefceef10fd828c95e3a4c65606;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 4852a51..b806a5f 100644 --- a/scene.c +++ b/scene.c @@ -460,19 +460,15 @@ void makeMenu() { /** * Called when window is resized - * @param w New width - * @param h New height + * @param width New width + * @param height New height */ void windowReshape(int width, int height) { glViewport(0, 0, (GLsizei)width, (GLsizei)height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - if (width <= height) - gluPerspective(60, (GLfloat)width / (GLfloat) height, 0.1, 1000.0); - else - gluPerspective(60, (GLfloat)height / (GLfloat) width, 0.1, 1000.0); - glMatrixMode(GL_MODELVIEW); + gluPerspective(60, 1, 0.1, 1000.0); /*glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); /* switch matrix mode @@ -504,7 +500,6 @@ void display() { glTranslatef(0.0f,0.0f,-6.0f); // Move Left 1.5 Units And Into The Screen 6.0 - glBegin(GL_QUADS); glColor3f(1.0f,0.0f,0.0f); // Set The Color To Red glVertex3f(-1.0f, 1.0f, 0.0f); // Top left