diff options
author | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2012-07-03 16:36:30 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-04 18:00:41 +0200 |
commit | e78b3e80e6f9310ca82ba1a1f1a59b2166ac872e (patch) | |
tree | 6344a30625036aaa8d603033b4beb72ac193633f /src/gui/kernel/qopenglcontext_p.h | |
parent | 3709d8dc52ca152ff584a04fda60a7968835f4c2 (diff) |
Properly detect the max texture size when using QOpenGLPaintDevice.
The value is currently hard-coded to 1024, this is a problem since
any image painted with a size higher that this will be scaled down before
being uploaded.
This patch copies the implementation from QGLContext which works correctly.
Change-Id: Ia2bda60cf21d9adf13c91cea4854a2b20e4041f2
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/gui/kernel/qopenglcontext_p.h')
-rw-r--r-- | src/gui/kernel/qopenglcontext_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index d5c4d6c762..5f3dee1e51 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -189,6 +189,7 @@ public: , surface(0) , functions(0) , current_fbo(0) + , max_texture_size(-1) , workaround_brokenFBOReadBack(false) , workaround_brokenTexSubImage(false) , active_engine(0) @@ -213,6 +214,7 @@ public: QOpenGLFunctions *functions; GLuint current_fbo; + GLint max_texture_size; bool workaround_brokenFBOReadBack; bool workaround_brokenTexSubImage; @@ -221,7 +223,7 @@ public: static void setCurrentContext(QOpenGLContext *context); - int maxTextureSize() const { return 1024; } + int maxTextureSize(); #if !defined(QT_NO_DEBUG) static bool toggleMakeCurrentTracker(QOpenGLContext *context, bool value) |