commit 01316faf5196aab8992417952208cbd01ffea130 parent 80233eec4179083189c2463d6219a370407fe170 Author: Yoann <yoann.b87@voila.fr> Date: Sun, 2 Oct 2011 19:49:26 +0200 Ajout du fichier d'entĂȘte pour display.c Diffstat:
| M | display.c | | | 29 | +++-------------------------- |
| A | display.h | | | 24 | ++++++++++++++++++++++++ |
2 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/display.c b/display.c @@ -1,27 +1,4 @@ -#include <SDL/SDL.h> -#include <GL/glew.h> -#include <GL/glu.h> -#include "roam.h" - -int initWindow(); -int mainLoop(); -void renderScene(); -void displayTree(Triangle *t); -void displayTree2(); -void Draw_Axes (); - -Triangle *t; -int *vertices; -int windowWidth = 1024; -int nbVertex = 0; -int windowHeight = 768; -int xCamera = 1024; -int yCamera = -800; -int zCamera = 600; -int xSight = 1024; -int ySight = 512; -int zSight = 0; -int moveDist = 64; +#include "display.h" int initWindow() { SDL_Init(SDL_INIT_VIDEO); @@ -106,8 +83,8 @@ void renderScene() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) ; drawAxes(); - displayTree2(); - //displayTree(t); + //displayTree2(); + displayTree(t); glFlush(); SDL_GL_SwapBuffers(); diff --git a/display.h b/display.h @@ -0,0 +1,24 @@ +#include <SDL/SDL.h> +#include <GL/glew.h> +#include <GL/glu.h> +#include "roam.h" + +int initWindow(); +int mainLoop(); +void renderScene(); +void displayTree(Triangle *t); +void displayTree2(); +void Draw_Axes (); + +Triangle *t; +int *vertices; +int windowWidth = 1024; +int nbVertex = 0; +int windowHeight = 768; +int xCamera = 1024; +int yCamera = -800; +int zCamera = 600; +int xSight = 1024; +int ySight = 512; +int zSight = 0; +int moveDist = 64;