Merge branch 'master' of github:jsmaniac/2011-m2s3-city-builder

Conflicts:
	Makefile
This commit is contained in:
Georges Dupéron 2011-09-26 22:43:03 +02:00
commit ef8400fa35
2 changed files with 10 additions and 5 deletions

View File

@ -16,7 +16,7 @@ simple-terrain: simple-terrain.c Makefile
$(CC) $< -o $@
display: display.c Makefile
$(CC) -lGL -lSDL $< $(CFLAGS) -o $@
$(CC) -lGL -lSDL -lGLU $< $(CFLAGS) -o $@
roam: roam.c Makefile
$(CC) $< $(CFLAGS) -o $@

View File

@ -22,11 +22,16 @@ int main(int argc, char *argv[]) {
}
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode( GL_PROJECTION );
glLoadIdentity( );
gluPerspective(70,(double)640/480,1,1000);
gluLookAt(0, 0, -3, 0, 0.75, 0, 0, 1, 0);
glBegin(GL_TRIANGLES);
glColor3ub(255,0,0); glVertex2d(-0.75,-0.75);
glColor3ub(0,255,0); glVertex2d(0,0.75);
glColor3ub(0,0,255); glVertex2d(0.75,-0.75);
glColor3ub(255,0,0); glVertex3d(-0.75,-0.75,0);
glColor3ub(0,255,0); glVertex3d(0,0.75,0);
glColor3ub(0,0,255); glVertex3d(0.75,-0.75,0);
glEnd();
glFlush();