Commit 8e293042 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

scenes/opengl: Update unstyled EffectFrame texture only when rendering

When the EffectFrame is created, there may not be any opengl context
current.


(cherry picked from commit 3b8b87a6)
parent 7a48ec6e
......@@ -1667,9 +1667,6 @@ SceneOpenGL::EffectFrame::EffectFrame(EffectFrameImpl* frame, SceneOpenGL *scene
, m_unstyledVBO(nullptr)
, m_scene(scene)
{
if (m_effectFrame->style() == EffectFrameUnstyled && !m_unstyledTexture) {
updateUnstyledTexture();
}
}
SceneOpenGL::EffectFrame::~EffectFrame()
......@@ -1765,6 +1762,10 @@ void SceneOpenGL::EffectFrame::render(const QRegion &_region, double opacity, do
// Render the actual frame
if (m_effectFrame->style() == EffectFrameUnstyled) {
if (!m_unstyledTexture) {
updateUnstyledTexture();
}
if (!m_unstyledVBO) {
m_unstyledVBO = new GLVertexBuffer(GLVertexBuffer::Static);
QRect area = m_effectFrame->geometry();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment