[effects] Remove clip plane from Cube effect
It broke the rendering of the reflection.
This commit is contained in:
parent
613d76f2df
commit
5f15528428
1 changed files with 0 additions and 16 deletions
|
@ -381,10 +381,6 @@ void CubeEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
||||||
m_reflectionMatrix.translate(0.0, sin(fabs(manualAngle) * M_PI / 360.0f * float(effects->numberOfDesktops())) * addedHeight2 + addedHeight1 - float(rect.height()), 0.0);
|
m_reflectionMatrix.translate(0.0, sin(fabs(manualAngle) * M_PI / 360.0f * float(effects->numberOfDesktops())) * addedHeight2 + addedHeight1 - float(rect.height()), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: find a solution for GLES
|
|
||||||
if (!GLPlatform::instance()->isGLES()) {
|
|
||||||
glEnable(GL_CLIP_PLANE0);
|
|
||||||
}
|
|
||||||
reflectionPainting = true;
|
reflectionPainting = true;
|
||||||
glEnable(GL_CULL_FACE);
|
glEnable(GL_CULL_FACE);
|
||||||
paintCap(true, -point - zTranslate, data.projectionMatrix());
|
paintCap(true, -point - zTranslate, data.projectionMatrix());
|
||||||
|
@ -399,10 +395,6 @@ void CubeEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
||||||
paintCap(false, -point - zTranslate, data.projectionMatrix());
|
paintCap(false, -point - zTranslate, data.projectionMatrix());
|
||||||
glDisable(GL_CULL_FACE);
|
glDisable(GL_CULL_FACE);
|
||||||
reflectionPainting = false;
|
reflectionPainting = false;
|
||||||
// TODO: find a solution for GLES
|
|
||||||
if (!GLPlatform::instance()->isGLES()) {
|
|
||||||
glDisable(GL_CLIP_PLANE0);
|
|
||||||
}
|
|
||||||
|
|
||||||
const float width = rect.width();
|
const float width = rect.width();
|
||||||
const float height = rect.height();
|
const float height = rect.height();
|
||||||
|
@ -1713,14 +1705,6 @@ void CubeEffect::setActive(bool active)
|
||||||
desktopChangedWhileRotating = false;
|
desktopChangedWhileRotating = false;
|
||||||
if (reflection) {
|
if (reflection) {
|
||||||
QRect rect = effects->clientArea(FullArea, activeScreen, effects->currentDesktop());
|
QRect rect = effects->clientArea(FullArea, activeScreen, effects->currentDesktop());
|
||||||
// clip parts above the reflection area
|
|
||||||
if (!GLPlatform::instance()->isGLES()) {
|
|
||||||
double eqn[4] = {0.0, 1.0, 0.0, 0.0};
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(0.0, rect.height(), 0.0);
|
|
||||||
glClipPlane(GL_CLIP_PLANE0, eqn);
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
|
||||||
float temporaryCoeff = float(rect.width()) / tan(M_PI / float(effects->numberOfDesktops()));
|
float temporaryCoeff = float(rect.width()) / tan(M_PI / float(effects->numberOfDesktops()));
|
||||||
mAddedHeightCoeff1 = sqrt(float(rect.height()) * float(rect.height()) + temporaryCoeff * temporaryCoeff);
|
mAddedHeightCoeff1 = sqrt(float(rect.height()) * float(rect.height()) + temporaryCoeff * temporaryCoeff);
|
||||||
mAddedHeightCoeff2 = sqrt(float(rect.height()) * float(rect.height()) + float(rect.width()) * float(rect.width()) + temporaryCoeff * temporaryCoeff);
|
mAddedHeightCoeff2 = sqrt(float(rect.height()) * float(rect.height()) + float(rect.width()) * float(rect.width()) + temporaryCoeff * temporaryCoeff);
|
||||||
|
|
Loading…
Reference in a new issue