www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 4dcafb5a447366ed81681d2cb8126b66f77570a8
parent 380eea345253e26cb8bed129f0e2cb809b7b0f9d
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Tue, 27 Sep 2011 11:23:05 +0200

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

Diffstat:
MMakefile | 2+-
Mdisplay.c | 11++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -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 $@ diff --git a/display.c b/display.c @@ -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);