summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.h
diff options
context:
space:
mode:
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;