summaryrefslogtreecommitdiff
path: root/unity-shared
diff options
authorDaniel van Vugt <daniel.van.vugt@canonical.com>2012-08-21 10:06:54 -0400
committerTarmac <>2012-08-21 10:06:54 -0400
commit554fca5a11cce8d227b24118b420a370de8d9da0 (patch)
tree4e49a6737e4079d67eacb75885c2035dd8ef795c /unity-shared
parent008bf471b2dd20ffcde8d322b5ae2c5aa5aa9402 (diff)
parentf6eac3d0917e7d728ebfd1bcc9d45e79c626e5f6 (diff)
Fix multiple build failures due to incorrect #ifdefs when configured with
-DBUILD_GLES=ON (which then defines USE_GLES). (LP: #1039453). Fixes: https://bugs.launchpad.net/bugs/1039453. Approved by Sam Spilsbury. (bzr r2599)
Diffstat (limited to 'unity-shared')
-rw-r--r--unity-shared/IconRenderer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/unity-shared/IconRenderer.cpp b/unity-shared/IconRenderer.cpp
index 2c37cc89c..aa3a9ccd5 100644
--- a/unity-shared/IconRenderer.cpp
+++ b/unity-shared/IconRenderer.cpp
@@ -745,7 +745,7 @@ void IconRenderer::RenderElement(nux::GraphicsEngine& GfxContext,
// Perspective correct
v0.x, v0.y, 0.0f, 1.0f, s0 / v0.w, t0 / v0.w, 0.0f, 1.0f / v0.w,
v1.x, v1.y, 0.0f, 1.0f, s1 / v1.w, t1 / v1.w, 0.0f, 1.0f / v1.w,
-#ifdef USE_MODERN_COMPIZ_GL
+#ifdef USE_GLES
v3.x, v3.y, 0.0f, 1.0f, s3 / v3.w, t3 / v3.w, 0.0f, 1.0f / v3.w,
v2.x, v2.y, 0.0f, 1.0f, s2 / v2.w, t2 / v2.w, 0.0f, 1.0f / v2.w,
#else
@@ -783,7 +783,7 @@ void IconRenderer::RenderElement(nux::GraphicsEngine& GfxContext,
local::shader_program_uv_persp_correction->SetUniformLocMatrix4fv((GLint)VPMatrixLocation, 1, false, (GLfloat*) & (_stored_projection_matrix.m));
}
}
-#ifndef USE_MODERN_COMPIZ_GL
+#ifndef USE_GLES
else
{
local::asm_shader->Begin();
@@ -821,13 +821,13 @@ void IconRenderer::RenderElement(nux::GraphicsEngine& GfxContext,
CHECKGL(glUniform4fARB(DesatFactor, arg.saturation, arg.saturation, arg.saturation, arg.saturation));
nux::GetWindowThread()->GetGraphicsEngine().SetTexture(GL_TEXTURE0, icon);
-#ifdef USE_MODERN_COMPIZ_GL
+#ifdef USE_GLES
CHECKGL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4));
#else
CHECKGL(glDrawArrays(GL_QUADS, 0, 4));
#endif
}
-#ifndef USE_MODERN_COMPIZ_GL
+#ifndef USE_GLES
else
{
CHECKGL(glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 0, bg_color.red, bg_color.green, bg_color.blue, bg_color.alpha));