diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-04-09 15:04:32 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-04-09 15:04:32 +0200 |
commit | e19c3838a4d89fb0640ed563ffdf58cd125cde7f (patch) | |
tree | 88a990b7bd54e8297d7619837ff6d8c4f928cd8e | |
parent | e9d6ab657235ebbf3eb9fcb35537c9b2181a1360 (diff) |
#include cleanup
-rw-r--r-- | gl.h | 7 | ||||
-rw-r--r-- | main.cpp | 6 | ||||
-rw-r--r-- | quadtree.cpp | 7 | ||||
-rw-r--r-- | quadtree.h | 2 | ||||
-rw-r--r-- | scene.cpp | 2 | ||||
-rw-r--r-- | shader.h | 4 | ||||
-rw-r--r-- | video.cpp | 3 |
7 files changed, 14 insertions, 17 deletions
@@ -0,0 +1,7 @@ +#ifndef GL_H +#define GL_H + +#define GL_GLEXT_PROTOTYPES +#include <SDL_opengl.h> + +#endif @@ -9,11 +9,7 @@ #include <boost/format.hpp> #include <boost/shared_ptr.hpp> -#define GL_GLEXT_PROTOTYPES -#include <SDL_opengl.h> -//#include <GL/gl.h> -#include <GL/gl.h> -//#include <GL/glu.h> +#include "gl.h" #include <iostream> #include <cmath> diff --git a/quadtree.cpp b/quadtree.cpp index 8082ba7..1f2dd4a 100644 --- a/quadtree.cpp +++ b/quadtree.cpp @@ -4,8 +4,7 @@ #include <boost/format.hpp> #include <boost/timer.hpp> -#define GL_GLEXT_PROTOTYPES -#include <GL/gl.h> +#include "gl.h" #include <cmath> #include <queue> @@ -170,10 +169,10 @@ Quadtree::QuadChunk::QuadChunk(Quadtree *tree, float x, float y, float width, fl this->y = y; this->width = width; this->height = height; + this->vbo_object = this->node_count = this->vertices = 0; + this->nodes = NULL; if(width / chunk_size > 1) { - node_count = 0; - nodes = NULL; for(int i = 0; i < 4; i++) { float nx = x + ((i & 1) ^((i & 2) >> 1)) * width / 2; float ny = y + ((i & 2) >> 1) * height / 2; @@ -3,8 +3,6 @@ #include "vector.h" -#include <list> - class Quadtree { public: struct QuadChunk; @@ -1,7 +1,7 @@ #include "scene.h" #include <SDL_image.h> -#include <SDL_opengl.h> +#include "gl.h" #include <cmath> @@ -1,9 +1,7 @@ #ifndef SHADER_H #define SHADER_H -#define GL_GLEXT_PROTOTYPES -#include <GL/gl.h> -#include <GL/glu.h> +#include "gl.h" class GLBaseShader { friend class GLShaderProgram; @@ -1,7 +1,6 @@ #include "video.h" -#include <GL/gl.h> -#include <GL/glu.h> +#include "gl.h" SDL_Surface *video::surface = NULL; int video::width = 800; |