Make the EffectFrame textures regular GLTextures

There is valid reason for these textures to be Scene::Texture's.
This commit is contained in:
Fredrik Höglund 2014-11-23 14:33:19 +01:00
parent 383a5ac319
commit 34f1408134
2 changed files with 12 additions and 12 deletions

View file

@ -1771,7 +1771,7 @@ void SceneOpenGL::EffectFrame::render(QRegion region, double opacity, double fra
if (!m_selectionTexture) { // Lazy creation
QPixmap pixmap = m_effectFrame->selectionFrame().framePixmap();
if (!pixmap.isNull())
m_selectionTexture = m_scene->createTexture(pixmap);
m_selectionTexture = new GLTexture(pixmap);
}
if (m_selectionTexture) {
if (shader) {
@ -1812,7 +1812,7 @@ void SceneOpenGL::EffectFrame::render(QRegion region, double opacity, double fra
}
if (!m_iconTexture) { // lazy creation
m_iconTexture = m_scene->createTexture(m_effectFrame->icon().pixmap(m_effectFrame->iconSize()));
m_iconTexture = new GLTexture(m_effectFrame->icon().pixmap(m_effectFrame->iconSize()));
}
m_iconTexture->bind();
m_iconTexture->render(region, QRect(topLeft, m_effectFrame->iconSize()));
@ -1859,7 +1859,7 @@ void SceneOpenGL::EffectFrame::updateTexture()
m_texture = 0L;
if (m_effectFrame->style() == EffectFrameStyled) {
QPixmap pixmap = m_effectFrame->frame().framePixmap();
m_texture = m_scene->createTexture(pixmap);
m_texture = new GLTexture(pixmap);
}
}
@ -1895,7 +1895,7 @@ void SceneOpenGL::EffectFrame::updateTextTexture()
p.setPen(Qt::white);
p.drawText(rect, m_effectFrame->alignment(), text);
p.end();
m_textTexture = m_scene->createTexture(*m_textPixmap);
m_textTexture = new GLTexture(*m_textPixmap);
}
void SceneOpenGL::EffectFrame::updateUnstyledTexture()

View file

@ -292,14 +292,14 @@ private:
void updateTexture();
void updateTextTexture();
Texture* m_texture;
Texture* m_textTexture;
Texture* m_oldTextTexture;
QPixmap* m_textPixmap; // need to keep the pixmap around to workaround some driver problems
Texture* m_iconTexture;
Texture* m_oldIconTexture;
Texture* m_selectionTexture;
GLVertexBuffer* m_unstyledVBO;
GLTexture *m_texture;
GLTexture *m_textTexture;
GLTexture *m_oldTextTexture;
QPixmap *m_textPixmap; // need to keep the pixmap around to workaround some driver problems
GLTexture *m_iconTexture;
GLTexture *m_oldIconTexture;
GLTexture *m_selectionTexture;
GLVertexBuffer *m_unstyledVBO;
SceneOpenGL *m_scene;
static GLTexture* m_unstyledTexture;