X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=aa27999a91754bcc6b1640e3caab53ad2018d92b;hp=9b4db15fb54083dedfff868d290126179fd72984;hb=4cf287426fae4fe7d4bf5296453c91307314f8f1;hpb=35ed907a86960eecd655893efa23d16992c06b17 diff --git a/scene.c b/scene.c index 9b4db15..aa27999 100644 --- a/scene.c +++ b/scene.c @@ -291,7 +291,12 @@ void display() { glMatrixMode(GL_PROJECTION); glLoadIdentity(); - float aspect = (float)width / (float)height; + float aspect; + if ( width <= height ) { + aspect = (float)height / (float)width; + } else { + aspect = (float)width / (float)height; + } gluPerspective( 75.0, @@ -407,10 +412,9 @@ int main(int argc, char **argv) { glDepthRange(0,1); glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // the type - glEnable(GL_CULL_FACE); glEnable(GL_TEXTURE_2D); glEnable(GL_NORMALIZE); - glLineWidth(1.0); + glLineWidth(2.0); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);