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

This commit is contained in:
Georges Dupéron 2011-09-27 11:23:05 +02:00
commit 4dcafb5a44
2 changed files with 7 additions and 6 deletions

View File

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

View File

@ -1,5 +1,5 @@
#include <SDL/SDL.h>
#include <GL/gl.h>
#include <GL/glew.h>
#include <GL/glu.h>
int main(int argc, char *argv[]) {
@ -23,10 +23,11 @@ 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);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glBegin(GL_TRIANGLES);
glColor3ub(255,0,0); glVertex3d(-0.75,-0.75,0);