summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessdebugpipebackend_p.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-06 12:55:02 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-07 11:20:17 +0000
commitb122e0e32308d95e75aca2fe8f4391180e3c269b (patch)
tree3f3bdc314603ce9ec94ae81754a09abee4f36cdd /src/network/access/qnetworkaccessdebugpipebackend_p.h
parent70b7b2bffc09278e1f7210268ffcc871bc6d1c0f (diff)
Guard QGL2PaintEngineEx/QGLPaintDevice against using unset context
QGL2PaintEngineEx::end() calls endPaint() on the device, which may end up calling QGLContext::swapBuffers() on the context, a call which we have documented to require makeCurrent() for any further GL commands: Call this to finish a frame of OpenGL rendering, and make sure to call makeCurrent() again before issuing any further OpenGL commands, for example as part of a new frame. QOpenGLContext also documents that: To be able to support certain platforms, QOpenGLContext requires that you call makeCurrent() again before starting rendering a new frame, after calling swapBuffers(). As a consequence, we need to guard the GL usage in QGLPaintDevice::endPaint(), as well as the GL reset in QGL2PaintEngineEx::end(). Change-Id: Ib66e91cce12fbaea32ed3c30141150fa15907187 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/network/access/qnetworkaccessdebugpipebackend_p.h')
0 files changed, 0 insertions, 0 deletions