summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-01 23:32:51 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-01 23:45:06 +0300
commit7fa069aec585316c34ada298ec557c7e800bf8f3 (patch)
tree64cb7078677a695eb9cc429e4546114d06ff6d37 /src/graphicsmanager.h
parentc195c960fc2ce7a5a211c26310ae98bfe39ab777 (diff)
downloadmv-7fa069aec585316c34ada298ec557c7e800bf8f3.tar.gz
mv-7fa069aec585316c34ada298ec557c7e800bf8f3.tar.bz2
mv-7fa069aec585316c34ada298ec557c7e800bf8f3.tar.xz
mv-7fa069aec585316c34ada298ec557c7e800bf8f3.zip
Using GL_ARB_sampler_objects.
Diffstat (limited to 'src/graphicsmanager.h')
-rw-r--r--src/graphicsmanager.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index 84523d19f..450040eed 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -21,6 +21,18 @@
#ifndef GRAPHICSMANAGER_H
#define GRAPHICSMANAGER_H
+#include "main.h"
+
+#ifdef USE_OPENGL
+#ifndef WIN32
+#define GL_GLEXT_PROTOTYPES 1
+#include <SDL_opengl.h>
+// hack to hide warnings
+#undef GL_GLEXT_VERSION
+#undef GL_GLEXT_PROTOTYPES
+#endif
+#endif
+
#include <set>
#include <string>
@@ -75,12 +87,16 @@ class GraphicsManager final
Graphics *createGraphics();
+ void createTextureSampler();
+
int getMaxVertices() const
{ return mMaxVertices; }
bool getUseAtlases() const
{ return mUseAtlases; }
+ unsigned int getLastError();
+
private:
std::set<std::string> mExtensions;
@@ -98,7 +114,13 @@ class GraphicsManager final
int mMaxVertices;
+#ifdef USE_OPENGL
+ bool mUseTextureSampler;
+
+ GLuint mTextureSampler;
+#endif
bool mUseAtlases;
+
};
extern GraphicsManager graphicsManager;