diff options
author | Antti Määttä <antti.maatta@qt.io> | 2016-08-31 11:56:30 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2016-09-01 05:40:15 +0000 |
commit | ce1db34bf273c397bb7b4be182f274547c35ea3e (patch) | |
tree | a11adfc1cc24cd6ccbe0a2b6c62ff5c3a4a09f20 /src/render/graphicshelpers/graphicscontext_p.h | |
parent | 320bdb45cf3a76e4a7c2b2ac79481e65280bb27a (diff) |
Reset bound fbo at the end of the rendering
The last bound fbo must be reset at the end of the rendering if the bound
fbo was changed due to render-to-texture. Otherwise offscreen rendering(in
scene3d case) might have wrong bound fbo. Also in threaded mode, if the
last renderview was rtt, the current fbo remains bound, and the next frame
doesn't render to the surface as expected.
Change-Id: I842040766aa6010740b008a36f7f9f2c935b0561
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext_p.h')
-rw-r--r-- | src/render/graphicshelpers/graphicscontext_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/render/graphicshelpers/graphicscontext_p.h b/src/render/graphicshelpers/graphicscontext_p.h index 1aa4c3e5a..cc63a03b6 100644 --- a/src/render/graphicshelpers/graphicscontext_p.h +++ b/src/render/graphicshelpers/graphicscontext_p.h @@ -180,6 +180,7 @@ public: // Wrapper methods void alphaTest(GLenum mode1, GLenum mode2); + void bindFramebuffer(GLuint fbo); void bindBufferBase(GLenum target, GLuint bindingIndex, GLuint buffer); void bindFragOutputs(GLuint shader, const QHash<QString, int> &outputs); void bindUniformBlock(GLuint programId, GLuint uniformBlockIndex, GLuint uniformBlockBinding); |