Merge pull request #12695 from gcalero/fix/current_context

Fix/current context
This commit is contained in:
Sam Gondelman 2018-03-22 10:54:34 -07:00 committed by GitHub
commit e46a8f022c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View file

@ -69,8 +69,7 @@ bool OffscreenGLCanvas::create(QOpenGLContext* sharedContext) {
qFatal("Offscreen surface is invalid");
}
#endif
#if !defined(USE_GLES)
if (gl::Context::enableDebugLogger()) {
_context->makeCurrent(_offscreenSurface);
QOpenGLDebugLogger *logger = new QOpenGLDebugLogger(this);
@ -80,7 +79,6 @@ bool OffscreenGLCanvas::create(QOpenGLContext* sharedContext) {
logger->startLogging(QOpenGLDebugLogger::SynchronousLogging);
_context->doneCurrent();
}
#endif
return true;
}

View file

@ -17,8 +17,7 @@ std::string GLBackend::getBackendShaderHeader() const {
#if defined(USE_GLES)
static const std::string header(
R"SHADER(
#version 310 es
R"SHADER(#version 310 es
#extension GL_EXT_texture_buffer : enable
precision lowp float; // check precision 2
precision lowp samplerBuffer;
@ -26,8 +25,7 @@ precision lowp sampler2DShadow;
)SHADER");
#else
static const std::string header(
R"SHADER(
#version 410 core
R"SHADER(#version 410 core
)SHADER");
#endif