Support new translate for textures
This commit is contained in:
parent
e5932ff214
commit
d12c4e58fd
2 changed files with 5 additions and 2 deletions
|
@ -525,7 +525,10 @@ void GLTexture::render( QRegion region, const QRect& rect, bool useShader )
|
|||
m_vbo->setData( 4, 2, verts, texcoords );
|
||||
}
|
||||
if (useShader) {
|
||||
// TODO: set shader translation.
|
||||
GLint currentProgram;
|
||||
glGetIntegerv( GL_CURRENT_PROGRAM, ¤tProgram );
|
||||
GLint location = glGetUniformLocation(currentProgram, "geometry");
|
||||
glUniform4f(location, rect.x(), rect.y(), 0.0f, 0.0f);
|
||||
} else {
|
||||
#ifndef KWIN_HAVE_OPENGLES
|
||||
glTranslatef( rect.x(), rect.y(), 0.0f );
|
||||
|
|
|
@ -1362,7 +1362,7 @@ void SceneOpenGL::EffectFrame::render( QRegion region, double opacity, double fr
|
|||
m_unstyledTexture->bind();
|
||||
const QPoint pt = m_effectFrame->geometry().topLeft();
|
||||
if (sceneShader) {
|
||||
// TODO: move geometry
|
||||
shader->setUniform("geometry", QVector4D(pt.x(), pt.y(), 0.0f, 0.0f));
|
||||
} else {
|
||||
#ifndef KWIN_HAVE_OPENGLES
|
||||
glTranslatef( pt.x(), pt.y(), 0.0f );
|
||||
|
|
Loading…
Reference in a new issue