summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands.cpp13
-rw-r--r--src/commands.h3
-rw-r--r--src/graphicsmanager.h3
3 files changed, 19 insertions, 0 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 67bf9cf73..788a20b98 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -27,6 +27,7 @@
#include "client.h"
#include "configuration.h"
#include "game.h"
+#include "graphicsmanager.h"
#include "guildmanager.h"
#include "main.h"
#include "party.h"
@@ -1287,6 +1288,18 @@ impHandler0(testsdlfont)
#endif
}
+#ifdef USE_OPENGL
+impHandler2(dumpGL)
+{
+ std::string str = graphicsManager.getGLVersion();
+ outStringNormal(tab, str, str);
+}
+#else
+impHandler0(dumpGL)
+{
+}
+#endif
+
#ifdef DEBUG_DUMP_LEAKS1
void showRes(std::string str, ResourceManager::Resources *res);
diff --git a/src/commands.h b/src/commands.h
index 9a5c60157..6825159c4 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -114,6 +114,7 @@ namespace Commands
decHandler(dumpEnvironment);
decHandler(dumpTests);
decHandler(dumpOGL);
+ decHandler(dumpGL);
decHandler(cacheInfo);
decHandler(execute);
decHandler(testsdlfont);
@@ -199,6 +200,7 @@ enum
COMMAND_DUMPE,
COMMAND_DUMPT,
COMMAND_DUMPOGL,
+ COMMAND_DUMPGL,
COMMAND_URL,
COMMAND_OPEN,
COMMAND_EXECUTE,
@@ -291,6 +293,7 @@ static const CommandInfo commands[] =
{"dumpe", &Commands::dumpEnvironment, -1, false},
{"dumpt", &Commands::dumpTests, -1, false},
{"dumpogl", &Commands::dumpOGL, -1, false},
+ {"dumpgl", &Commands::dumpGL, -1, false},
{"url", &Commands::url, -1, true},
{"open", &Commands::open, -1, true},
{"execute", &Commands::execute, -1, true},
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index d3a9fe46d..7629408be 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -153,6 +153,9 @@ class GraphicsManager final
static std::string errorToString(const GLenum error) A_WARN_UNUSED;
void updateDebugLog() const;
+
+ std::string getGLVersion()
+ { return mGlVersionString; }
#endif
private: