From b5bd8adb4a5e60d470e04288ece0ee98e214fb3e Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Sun, 9 Oct 2011 14:35:25 +0800 Subject: [PATCH 1/1] --- scene.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/scene.c b/scene.c index f55aa88..166cf8c 100644 --- a/scene.c +++ b/scene.c @@ -1,9 +1,7 @@ -// compile this program using: -// gcc -O3 -Wall -std=c99 -o scene scene.c bitmap.c -lglut -// Or, with cygwin: (-mno-cygwin is only so the executable runs from windows) -// gcc -mno-cygwin -O3 -Wall -std=c99 -o scene scene.c bitmap.c -lglut32 -lglu32 -lopengl32 -// Or, use make via the supplied Makefile: (For cygwin, install the package for make) -// make +/** + * CITS2231 Graphics Scene Editor + * @author Ashley Tyndall (20915779) + */ #include #include @@ -485,6 +483,17 @@ void mouse(int btn, int state, int x, int y) { */ void display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glLoadIdentity(); + + glTranslatef(-1.5f, 0.0f, -6.0f); + + glBegin(GL_QUADS); + glVertex3f(-1.0f, 1.0f, 0.0f); // Top left + glVertex3f( 1.0f, 1.0f, 0.0f); // Top Right + glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right + glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left + glEnd(); + glFlush(); } -- 2.20.1