diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2016-08-14 09:23:05 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-08-14 09:41:21 +0100 |
commit | 9a18925b63d47a20d7b74cfd508d7ae71f2d4d7c (patch) | |
tree | 4d0d0538b9475a9104d56ee3d07f4bab7b0e00b4 /src/render/graphicshelpers/graphicscontext.cpp | |
parent | 9a1c0c96246126d2377bd56ed702f47214e3ee0a (diff) | |
parent | 71eee85093ba807f5bc2add472b359841faa062d (diff) |
Merge branch '5.7' into dev
Change-Id: Id62e225062a030f4864fb7af2ed6f60d6be87460
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext.cpp')
-rw-r--r-- | src/render/graphicshelpers/graphicscontext.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp index 5169c8fb4..acec8edf6 100644 --- a/src/render/graphicshelpers/graphicscontext.cpp +++ b/src/render/graphicshelpers/graphicscontext.cpp @@ -71,6 +71,7 @@ #include <Qt3DRender/private/graphicshelpergl4_p.h> #endif #include <Qt3DRender/private/graphicshelperes2_p.h> +#include <Qt3DRender/private/graphicshelperes3_p.h> #include <QSurface> #include <QWindow> @@ -285,7 +286,6 @@ void GraphicsContext::endDrawing(bool swapBuffers) m_gl->swapBuffers(m_surface); if (m_ownCurrent) m_gl->doneCurrent(); - m_stateSet = nullptr; decayTextureScores(); } @@ -557,7 +557,7 @@ void GraphicsContext::bindFrameBufferAttachmentHelper(GLuint fboId, const Attach if (fboSize.isEmpty()) fboSize = QSize(glTex->width(), glTex->height()); else - fboSize = QSize(qMin(fboSize.width(), glTex->width()), qMin(fboSize.width(), glTex->width())); + fboSize = QSize(qMin(fboSize.width(), glTex->width()), qMin(fboSize.height(), glTex->height())); m_glHelper->bindFrameBufferAttachment(glTex, attachment); } } @@ -647,7 +647,10 @@ GraphicsHelperInterface *GraphicsContext::resolveHighestOpenGLFunctions() GraphicsHelperInterface *glHelper = nullptr; if (m_gl->isOpenGLES()) { - glHelper = new GraphicsHelperES2(); + if (m_gl->format().majorVersion() >= 3) + glHelper = new GraphicsHelperES3(); + else + glHelper = new GraphicsHelperES2(); glHelper->initializeHelper(m_gl, nullptr); qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 2/ES2 Helper"; } |