summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-04-30 11:16:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-30 12:45:30 +0200
commit299154bd652a70c4ff90f2b2d08c1939cafe2df0 (patch)
tree2cd2b033d640752097a479028c0f3000413b37f1 /src
parent6f87ca2908787f12de3f3a45361decf13f27db9e (diff)
iOS: Simplify context format setup
Change-Id: I6a6a025410298cecd5f62abd08388a7379359af7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/ios/qioscontext.mm14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm
index e2a6113010..9467cfdb42 100644
--- a/src/plugins/platforms/ios/qioscontext.mm
+++ b/src/plugins/platforms/ios/qioscontext.mm
@@ -52,20 +52,16 @@
QIOSContext::QIOSContext(QOpenGLContext *context)
: QPlatformOpenGLContext()
, m_eaglContext([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2])
+ , m_format(context->format())
{
- // Start out with the requested format
- QSurfaceFormat format = context->format();
-
- format.setRenderableType(QSurfaceFormat::OpenGLES);
- format.setMajorVersion(2);
- format.setMinorVersion(0);
+ m_format.setRenderableType(QSurfaceFormat::OpenGLES);
+ m_format.setMajorVersion(2);
+ m_format.setMinorVersion(0);
// Even though iOS internally double-buffers its rendering, we
// report single-buffered here since the buffer remains unchanged
// when swapping unlesss you manually clear it yourself.
- format.setSwapBehavior(QSurfaceFormat::SingleBuffer);
-
- m_format = format;
+ m_format.setSwapBehavior(QSurfaceFormat::SingleBuffer);
}
QIOSContext::~QIOSContext()