Properly detect the max texture size when using QOpenGLPaintDevice.
authorJocelyn Turcotte <jocelyn.turcotte@nokia.com>
Tue, 3 Jul 2012 14:36:30 +0000 (16:36 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 4 Jul 2012 16:00:41 +0000 (18:00 +0200)
commite78b3e80e6f9310ca82ba1a1f1a59b2166ac872e
tree6344a30625036aaa8d603033b4beb72ac193633f
parent3709d8dc52ca152ff584a04fda60a7968835f4c2
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>
src/gui/kernel/qopenglcontext.cpp
src/gui/kernel/qopenglcontext_p.h