summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-10-05 06:58:23 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-10-05 06:58:23 +0200
commit4e5f45f47fa3568f6b081d56f9e7119367fc775c (patch)
treeff3f3e9f7f73a741b5dbf8d614e48a0643301e53
parent8e0a72184085aa6e3e741ad5d79f5db2e63d63a6 (diff)
Added OpenGL header wrapper.
-rw-r--r--gl.h6
-rw-r--r--pointsprite.cpp2
-rw-r--r--shader.h2
-rw-r--r--texture.cpp2
4 files changed, 9 insertions, 3 deletions
diff --git a/gl.h b/gl.h
new file mode 100644
index 0000000..87d321b
--- /dev/null
+++ b/gl.h
@@ -0,0 +1,6 @@
+#ifndef GL_H
+#define GL_H
+
+#include <SFML/Window/OpenGL.hpp>
+
+#endif
diff --git a/pointsprite.cpp b/pointsprite.cpp
index 314fc15..0b29f78 100644
--- a/pointsprite.cpp
+++ b/pointsprite.cpp
@@ -1,6 +1,6 @@
#include "pointsprite.h"
-#include <SFML/Window/OpenGL.hpp>
+#include "gl.h"
PointSprite::PointSprite(float _size, const Texture& _texture) : texture(_texture) {
size = _size;
diff --git a/shader.h b/shader.h
index 9048fe6..6881be0 100644
--- a/shader.h
+++ b/shader.h
@@ -4,7 +4,7 @@
#include <string>
#define GL_GLEXT_PROTOTYPES
-#include <SFML/Window/OpenGL.hpp>
+#include "gl.h"
class GLBaseShader {
friend class GLShaderProgram;
diff --git a/texture.cpp b/texture.cpp
index 52ed861..4c9cb6d 100644
--- a/texture.cpp
+++ b/texture.cpp
@@ -1,6 +1,6 @@
-#include <SFML/Window/OpenGL.hpp>
#include <stdexcept>
#include "texture.h"
+#include "gl.h"
void Texture::bind() const {
glBindTexture(GL_TEXTURE_2D, texture);