Skip to content

Commit 69ff8d9

Browse files
committed
QtQuick sample - fix GL_INVALID_ENUM errors within OpenGl_Context::init()
1 parent f30c023 commit 69ff8d9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

occt-qtquick/OcctQQuickFramebufferViewer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,14 @@ void OcctQQuickFramebufferViewer::initializeGL(QOpenGLFramebufferObject* theFbo)
421421
const Graphic3d_Vec2i aViewSize(theFbo->size().width(), theFbo->size().height());
422422

423423
const bool isFirstInit = myView->Window().IsNull();
424+
theFbo->bindDefault(); // initialize OpenGl_Context with default (window) FBO
424425
if (!OcctGlTools::InitializeGlWindow(myView, aNativeWin, aViewSize, aQWindow->devicePixelRatio()))
425426
{
426427
Q_EMIT glCriticalError("OpenGl_Context is unable to wrap OpenGL context");
427428
return;
428429
}
429430

430-
theFbo->bind();
431+
theFbo->bind(); // rebind offscreen FBO
431432
dumpGlInfo(true, true);
432433
if (isFirstInit)
433434
{

0 commit comments

Comments
 (0)