summaryrefslogtreecommitdiff
path: root/plugins/unity-mt-grab-handles/src
diff options
authorAlexandros Frantzis <alexandros.frantzis@linaro.org>2012-04-06 13:23:49 +0300
committerAlexandros Frantzis <alexandros.frantzis@linaro.org>2012-04-06 13:23:49 +0300
commit16dcda6e8369f30d9573055dd42ca541e1b65e24 (patch)
treeee81cbcbf1cbe86f8f923527880cfd34dc68b641 /plugins/unity-mt-grab-handles/src
parentfb5beb0c41c577bd488f0143cee1bc7d3c2d1395 (diff)
Disassociate using GLES and using the modern Compiz GL API.
This allows building using the modern Compiz GL API with desktop GL by configuring with -DUSE_MODERN_COMPIZ_GL=ON. (bzr r2246.4.1)
Diffstat (limited to 'plugins/unity-mt-grab-handles/src')
-rw-r--r--plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp14
-rw-r--r--plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp
index c17ad2d0f..74bd70d7c 100644
--- a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp
+++ b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp
@@ -438,7 +438,7 @@ UnityMTGrabHandlesWindow::getOutputExtents(CompWindowExtents& output)
bool
UnityMTGrabHandlesWindow::glDraw(const GLMatrix& transform,
-#ifdef USE_GLES
+#ifdef USE_MODERN_COMPIZ_GL
const GLWindowPaintAttrib& attrib,
#else
GLFragment::Attrib& fragment,
@@ -448,7 +448,7 @@ UnityMTGrabHandlesWindow::glDraw(const GLMatrix& transform,
{
/* Draw the window on the bottom, we will be drawing the
* handles on top */
-#ifdef USE_GLES
+#ifdef USE_MODERN_COMPIZ_GL
bool status = gWindow->glDraw(transform, attrib, region, mask);
#else
bool status = gWindow->glDraw(transform, fragment, region, mask);
@@ -472,13 +472,13 @@ UnityMTGrabHandlesWindow::glDraw(const GLMatrix& transform,
GLTexture::MatrixList matl;
GLTexture::Matrix mat = tex->matrix();
CompRegion paintRegion(region);
-#ifdef USE_GLES
+#ifdef USE_MODERN_COMPIZ_GL
GLWindowPaintAttrib wAttrib(attrib);
#endif
/* We can reset the window geometry since it will be
* re-added later */
-#ifdef USE_GLES
+#ifdef USE_MODERN_COMPIZ_GL
gWindow->vertexBuffer()->begin();
#else
gWindow->geometry().reset();
@@ -498,7 +498,7 @@ UnityMTGrabHandlesWindow::glDraw(const GLMatrix& transform,
* dim (so we get a nice render for things like
* wobbly etc etc */
gWindow->glAddGeometry(matl, reg, paintRegion);
-#ifdef USE_GLES
+#ifdef USE_MODERN_COMPIZ_GL
gWindow->vertexBuffer()->end();
wAttrib.opacity = mHandles->opacity();
#else
@@ -513,7 +513,7 @@ UnityMTGrabHandlesWindow::glDraw(const GLMatrix& transform,
/* Draw the dim texture with all of it's modified
* geometry glory */
gWindow->glDrawTexture(tex,
-#ifdef USE_GLES
+#ifdef USE_MODERN_COMPIZ_GL
transform, wAttrib,
#else
fragment,
@@ -523,7 +523,7 @@ UnityMTGrabHandlesWindow::glDraw(const GLMatrix& transform,
PAINT_WINDOW_TRANSFORMED_MASK);
/* Texture rendering tear-down */
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-#ifndef USE_GLES
+#ifndef USE_MODERN_COMPIZ_GL
us->gScreen->setTexEnvMode(GL_REPLACE);
}
#endif
diff --git a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h
index a5a4e362e..9cd99b9d1 100644
--- a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h
+++ b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h
@@ -229,7 +229,7 @@ public:
void moveNotify(int dx, int dy, bool immediate);
bool glDraw(const GLMatrix&,
-#ifdef USE_GLES
+#ifdef USE_MODERN_COMPIZ_GL
const GLWindowPaintAttrib&,
#else
GLFragment::Attrib&,