We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb93dc9 commit d180546Copy full SHA for d180546
src/penlayer.cpp
@@ -56,6 +56,11 @@ void PenLayer::setEngine(libscratchcpp::IEngine *newEngine)
56
if (!m_painter)
57
m_painter = std::make_unique<QNanoPainter>();
58
59
+ if (!m_glF) {
60
+ m_glF = std::make_unique<QOpenGLFunctions>();
61
+ m_glF->initializeOpenGLFunctions();
62
+ }
63
+
64
clear();
65
}
66
@@ -67,11 +72,6 @@ void scratchcpprender::PenLayer::clear()
67
72
if (!m_fbo)
68
73
return;
69
74
70
- if (!m_glF) {
71
- m_glF = std::make_unique<QOpenGLFunctions>();
- m_glF->initializeOpenGLFunctions();
- }
-
75
m_fbo->bind();
76
m_glF->glDisable(GL_SCISSOR_TEST);
77
m_glF->glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
0 commit comments