[effects] Simplify setting mvp matrix for cursor in zoom effect
Now that we pass the projection matrix with screen paint data we don't need to calculate our own matrix.
This commit is contained in:
parent
4e8e0f817f
commit
7facdb67ee
1 changed files with 1 additions and 3 deletions
|
@ -359,9 +359,7 @@ void ZoomEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
auto s = ShaderManager::instance()->pushShader(ShaderTrait::MapTexture);
|
auto s = ShaderManager::instance()->pushShader(ShaderTrait::MapTexture);
|
||||||
QMatrix4x4 mvp;
|
QMatrix4x4 mvp = data.projectionMatrix();
|
||||||
const QSize size = effects->virtualScreenSize();
|
|
||||||
mvp.ortho(0, size.width(), size.height(), 0, 0, 65535);
|
|
||||||
mvp.translate(rect.x(), rect.y());
|
mvp.translate(rect.x(), rect.y());
|
||||||
s->setUniform(GLShader::ModelViewProjectionMatrix, mvp);
|
s->setUniform(GLShader::ModelViewProjectionMatrix, mvp);
|
||||||
texture->render(region, rect);
|
texture->render(region, rect);
|
||||||
|
|
Loading…
Reference in a new issue