X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=166cf8c9bd09c1f7c23c53fa9a4133d8ade0861a;hb=b5bd8adb4a5e60d470e04288ece0ee98e214fb3e;hp=f55aa88b8246275d8a424387eb5b2b9f4b053d95;hpb=eaad3682302d31737d06068bc6471511ee3cbe59;p=atyndall%2Fcits2231.git 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(); }