From a538627edfe8214eff1b3b890ffa6eb9832f7de5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 4 Oct 2012 22:52:29 +0300 Subject: Read max fbo size. --- src/graphicsmanager.cpp | 11 +++++++++++ src/graphicsmanager.h | 2 ++ 2 files changed, 13 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2