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

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

View file

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