summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-10-06 15:38:54 +0200
committerSamuel Rødal <sroedal@trolltech.com>2009-10-06 15:38:55 +0200
commit6b623c04060d274c048c0d4c6dbc5a90d1c31604 (patch)
tree5cfbc3cd1c3520302d01e9c12a4355317da41b2a /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
parent6d17e09c274803d324e8a8db579aaafaefaab33f (diff)
Switched to using stencil instead of depth buffer for clipping.
Based on Aaron Kennedy's patch. All tests are green, but when enabling scissoring UniteClip seems to be broken atm.
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index dd5f4fc0ed..bfc6a3f4f9 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -217,8 +217,6 @@ public:
bool brushUniformsDirty;
bool simpleShaderMatrixUniformDirty;
bool shaderMatrixUniformDirty;
- bool depthUniformDirty;
- bool simpleShaderDepthUniformDirty;
bool opacityUniformDirty;
QRegion dirtyStencilRegion;
@@ -242,25 +240,14 @@ public:
void clearClip(uint value);
void writeClip(const QVectorPath &path, uint value);
+ void resetClipIfNeeded();
+
void updateClipScissorTest();
void setScissor(const QRect &rect);
void regenerateClip();
void systemStateChanged();
uint use_system_clip : 1;
- static inline GLfloat rawDepth(uint depth)
- {
- // assume at least 16 bits in the depth buffer, and
- // use 2^15 depth levels to be safe with regard to
- // rounding issues etc
- return depth * (1.0f / GLfloat((1 << 15) - 1));
- }
-
- static inline GLfloat normalizedDeviceDepth(uint depth)
- {
- return 2.0f * rawDepth(depth) - 1.0f;
- }
-
uint location(QGLEngineShaderManager::Uniform uniform)
{
return shaderManager->getUniformLocation(uniform);