summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp37
-rw-r--r--src/opengl/qgl.h6
-rw-r--r--src/opengl/qpaintengine_opengl.cpp5
3 files changed, 7 insertions, 41 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index b2f4b34b02..ab103ba836 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1691,6 +1691,8 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
}
int numGlyphs = vertexCoordinates->vertexCount() / 4;
+ if (numGlyphs == 0)
+ return;
if (elementIndices.size() < numGlyphs*6) {
Q_ASSERT(elementIndices.size() % 6 == 0);
@@ -2318,41 +2320,6 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
state()->currentClip = d->maxClip;
state()->clipTestEnabled = true;
break;
- case Qt::UniteClip: {
- d->resetClipIfNeeded();
- ++d->maxClip;
- if (state()->rectangleClip.isValid()) {
- QPainterPath path;
- path.addRect(state()->rectangleClip);
-
- // flush the existing clip rectangle to the depth buffer
- d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(path)), d->maxClip);
- }
-
- state()->clipTestEnabled = false;
-#ifndef QT_GL_NO_SCISSOR_TEST
- QRect oldRectangleClip = state()->rectangleClip;
-
- state()->rectangleClip = state()->rectangleClip.united(pathRect);
- d->updateClipScissorTest();
-
- QRegion extendRegion = QRegion(state()->rectangleClip) - oldRectangleClip;
-
- if (!extendRegion.isEmpty()) {
- QPainterPath extendPath;
- extendPath.addRegion(extendRegion);
-
- // first clear the depth buffer in the extended region
- d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(extendPath)), 0);
- }
-#endif
- // now write the clip path
- d->writeClip(path, d->maxClip);
- state()->canRestoreClip = false;
- state()->currentClip = d->maxClip;
- state()->clipTestEnabled = true;
- break;
- }
default:
break;
}
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 28c56a969a..26c0025342 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -83,7 +83,11 @@ typedef GLfloat GLdouble;
typedef GLfloat GLdouble;
# endif
#else
-# include <GL/gl.h>
+# if defined(Q_OS_MAC)
+# include <OpenGL/gl.h>
+# else
+# include <GL/gl.h>
+# endif
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index e05f312404..3c35c0334c 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -2413,11 +2413,6 @@ void QOpenGLPaintEngine::updateClipRegion(const QRegion &clipRegion, Qt::ClipOpe
else
state()->clipRegion = region;
break;
- case Qt::UniteClip:
- state()->clipRegion |= region;
- if (d->use_system_clip)
- state()->clipRegion &= sysClip;
- break;
default:
break;
}