3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 16:15:47 +02:00

Rm mystery GL error before qml fbo

This commit is contained in:
Zach Pomerantz 2016-03-22 12:05:24 -07:00
parent 23e3b7e4e3
commit 362e288be8

View file

@ -187,6 +187,15 @@ bool OffscreenQmlRenderThread::event(QEvent *e) {
void OffscreenQmlRenderThread::setupFbo() {
using namespace oglplus;
_textures.setSize(_size);
// Before making any ogl calls, clear any outstanding errors
// FIXME: Something upstream is polluting the context with a GL_INVALID_ENUM,
// likely from glewExperimental = true
GLenum err = glGetError();
if (err != GLEW_OK) {
qDebug() << "Clearing outstanding GL error to set up QML FBO:" << glewGetErrorString(err);
}
_depthStencil.reset(new Renderbuffer());
Context::Bound(Renderbuffer::Target::Renderbuffer, *_depthStencil)
.Storage(