summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-04 22:52:29 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-04 22:52:29 +0300
commita538627edfe8214eff1b3b890ffa6eb9832f7de5 (patch)
treebe7eb8d022d9b4a632cf11c0b415f311ef3734e8 /src
parent7a7f5905cf19f6a773dcf9bab762b54c16e325f2 (diff)
downloadmv-a538627edfe8214eff1b3b890ffa6eb9832f7de5.tar.gz
mv-a538627edfe8214eff1b3b890ffa6eb9832f7de5.tar.bz2
mv-a538627edfe8214eff1b3b890ffa6eb9832f7de5.tar.xz
mv-a538627edfe8214eff1b3b890ffa6eb9832f7de5.zip
Read max fbo size.
Diffstat (limited to 'src')
-rw-r--r--src/graphicsmanager.cpp11
-rw-r--r--src/graphicsmanager.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 604f0eb3f..c3867cb59 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -46,6 +46,10 @@
#include "debug.h"
+#ifndef GL_MAX_RENDERBUFFER_SIZE
+#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
+#endif
+
#ifdef WIN32
#define getFunction(name) wglGetProcAddress(name)
#else
@@ -64,6 +68,7 @@ GraphicsManager::GraphicsManager() :
mPlatformMinor(0),
mPlatformMajor(0),
mMaxVertices(500),
+ mMaxFboSize(0),
#ifdef USE_OPENGL
mUseTextureSampler(true),
mTextureSampler(0),
@@ -639,10 +644,16 @@ void GraphicsManager::updateLimits()
mMaxVertices = value;
+ value = 0;
glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &value);
logger->log("GL_MAX_ELEMENTS_INDICES: %d", value);
if (value < mMaxVertices)
mMaxVertices = value;
+
+ value = 0;
+ glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &value);
+ logger->log("Max FBO size: %d", value);
+ mMaxFboSize = value;
#endif
}
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index ab69a0cc6..40126dc1d 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -112,6 +112,8 @@ class GraphicsManager final
int mMaxVertices;
+ int mMaxFboSize;
+
#ifdef USE_OPENGL
bool mUseTextureSampler;