Fredrik Höglund
73be6657ea
kwin: Replace brightness and opacity with a modulation constant
...
This makes it possible to adjust both brightness and opacity
at the same time with one multiplication in the fragment shader.
2011-02-12 01:45:38 +01:00
Fredrik Höglund
175b45c5de
kwin: Fix an uninitialized member in GLShader.
...
mLocationsResolved wasn't being initialized in one of the constructors.
2011-02-12 01:23:59 +01:00
Fredrik Höglund
50e19e2cbc
kwin: Simplify ShaderManager::resetShader()
2011-02-10 21:36:24 +01:00
Fredrik Höglund
2fa966e0f9
kwin: Use the new setUniform() overloads in kwin core
2011-02-10 19:37:51 +01:00
Fredrik Höglund
85e9b6713f
kwin: Add additional setUniform() overloads
...
These are specialized overloads for setting the uniforms used
in the standard GLSL shaders in kwin.
2011-02-10 19:16:04 +01:00
Marco Martin
a12acccd3b
Merge branch 'master' into plasma/keyboard_applet_svgtext/mart
2011-02-07 20:10:26 +01:00
Thomas Lübking
b65f05f42b
sanitize GL version stringlist
...
BUG: 265131
2011-02-06 17:21:56 +01:00
Martin Gräßlin
fc54bdfe89
Unbind shader before copying pixels to back buffer.
...
This solves the regression with NVIDIA drivers resulting in a black screen.
Apparently NVIDIA does not support glXCopySubBuffer and the copying of pixels
fails with a shader bound.
So unbinding the shader before copying the pixels and rebinding the shader
afterwards resolves the issue.
This allows to remove the temporary hack to make NVIDIA work, again.
2011-02-06 09:30:04 +01:00
Martin Gräßlin
e2d4cba4c8
Temporarily workaround regression with NVIDIA.
...
KWin's new shaders fail with NVIDIA and present just a black screen
for the ortho shader (generic shader seems to work). Temporarily
disabling the shaders to force a fallback to old rendering code.
Of course the bug in the shader needs to be fixed.
2011-02-05 13:51:52 +01:00
Martin Gräßlin
154e3e61b0
Temporarily workaround regression with NVIDIA.
...
KWin's new shaders fail with NVIDIA and present just a black screen
for the ortho shader (generic shader seems to work). Temporarily
disabling the shaders to force a fallback to old rendering code.
Of course the bug in the shader needs to be fixed.
2011-02-05 12:06:32 +01:00
Fredrik Höglund
03ba96420a
kwin: Add overloads for setUniform() that take a location.
2011-02-04 21:23:29 +01:00
Martin Gräßlin
9bfef5d4ca
Drop addQuadVertices from kwinglutils.
...
KWin does not use GL_QUADS anymore for rendering windows.
This makes this method rather useless and isn't used anywhere either.
2011-02-04 21:23:29 +01:00
Martin Gräßlin
9814a8e81b
Remove renderGLGeometry from kwinglutils.
...
Not used anymore - completely replaced by VBO.
2011-02-04 21:23:29 +01:00
Fredrik Höglund
5cbd1d458b
kwin: Static member variables shouldn't have the m prefix.
2011-02-04 21:23:29 +01:00
Fredrik Höglund
cf58a57cf4
kwin: Fix a compiler warning about initialization order.
2011-02-04 21:23:29 +01:00
Fredrik Höglund
4dd9ef3327
kwin: Clean up the shader compilation code a bit.
2011-02-04 21:23:29 +01:00
Fredrik Höglund
ca8857a4d9
kwin: Change the shader source code parameters from QStrings to QByteArrays.
...
This eliminates the QByteArray -> QString -> QByteArray conversions.
2011-02-04 21:23:28 +01:00
Fredrik Höglund
8bc586e613
kwin: Add overloads for setUniform() that take a location.
2011-02-04 19:57:19 +01:00
Martin Gräßlin
859dadffd8
Drop addQuadVertices from kwinglutils.
...
KWin does not use GL_QUADS anymore for rendering windows.
This makes this method rather useless and isn't used anywhere either.
2011-02-04 19:46:20 +01:00
Martin Gräßlin
2e2a7948fb
Remove renderGLGeometry from kwinglutils.
...
Not used anymore - completely replaced by VBO.
2011-02-04 19:38:27 +01:00
Fredrik Höglund
f7633fff23
kwin: Static member variables shouldn't have the m prefix.
2011-02-04 17:32:13 +01:00
Fredrik Höglund
9dfc0332c6
kwin: Fix a compiler warning about initialization order.
2011-02-04 17:06:28 +01:00
Fredrik Höglund
f21ccf028a
kwin: Clean up the shader compilation code a bit.
2011-02-04 17:03:56 +01:00
Fredrik Höglund
9f41472085
kwin: Change the shader source code parameters from QStrings to QByteArrays.
...
This eliminates the QByteArray -> QString -> QByteArray conversions.
2011-02-04 16:41:55 +01:00
Christoph Thielecke
f95b82a907
define missing macros for systems which have only EXT defines.
...
these are:
- GL_FRAMEBUFFER
- GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
- GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
- GL_FRAMEBUFFER_UNSUPPORTED
- GL_COLOR_ATTACHMENT0
- GL_FRAMEBUFFER_COMPLETE
2011-02-04 08:34:19 +01:00
Martin Gräßlin
d9dc5afae4
Only link against GLES if building for GLES.
...
It took me two hours to figure out that kwineffects linked the GLES libraries
and that was causing my kwin not to work :-(
2011-02-03 22:30:14 +01:00
Martin Gräßlin
27c2b599b7
Bump the effects API version for 4.7.
...
Better late than never. As always keeping a buffer for API breaks in stable branch.
2011-02-01 23:05:21 +01:00
Martin Gräßlin
0a7e48f7aa
KWin uses kdelibs coding style.
2011-01-31 20:07:03 +01:00
Fredrik Höglund
3ada211c30
Don't enable loose binding with Gallium drivers in Mesa 7.10.
...
It's currently broken because of a regression in the mesa state tracker.
FIXED-IN: 4.6.0
BUG: 259872
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213870
2011-01-30 15:07:40 +01:00
Fredrik Höglund
ee406e6d86
Tweak the debug output to make it more readable.
...
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213845
2011-01-30 15:07:40 +01:00
Fredrik Höglund
7d5d8213dd
Don't print the GLSL version when GLSL isn't supported.
...
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213843
2011-01-30 15:07:40 +01:00
Fredrik Höglund
1643fdfc63
Add some missing radeon GPU's
...
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213842
2011-01-30 15:07:40 +01:00
Fredrik Höglund
83fd472bb3
Fix chipset detection with r300g
...
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213841
2011-01-30 15:07:02 +01:00
Martin Gräßlin
cf94a0e8f8
Binding shaders moved explicitly to ShaderManager.
2011-01-30 14:24:49 +01:00
Martin Gräßlin
19f6b9667b
Remove ShaderEffect from KWinEffects Library.
...
The class is not used by any effect any more and the
design of the ShaderEffect makes it hardly usable.
For most effects just rendering the windows with the Shader
attached to it makes more sense than rendering the complete
screen into a FBO and apply the shader on the off-screen texture.
2011-01-30 14:20:05 +01:00
Martin Gräßlin
36daa74589
Combine custom vertex with built-in fragment shader.
2011-01-30 14:12:06 +01:00
Martin Gräßlin
a478fc7ff3
Allow creating shaders from code directly.
2011-01-30 14:12:05 +01:00
Martin Gräßlin
f78d838fc7
Better support custom shaders.
2011-01-30 14:12:05 +01:00
Martin Gräßlin
61615ea7ff
Need to copy QPixmap to QImage in GLES.
...
The Image extension seems to need the pixmap around and that's something
we cannot guarantee in the generic case.
2011-01-30 14:12:05 +01:00
Martin Gräßlin
d683ce560c
Adding new uniform to enforce that alpha becomes 1.0
...
When rendering opaque (RGB-only) windows the alpha ends up to be 0
with blending disabled. This breaks subsequent rendering steps which
require blenden (e.g. Lanczos). Therefore a uniform is used to ensure
that the alpha channel is set to 1.
2011-01-30 14:12:04 +01:00
Martin Gräßlin
6252421a70
Disable clipping when rendering infiniteRegion
2011-01-30 14:12:04 +01:00
Martin Gräßlin
efb82daf30
Adding high-level method for glLoadMatrix
2011-01-30 14:12:03 +01:00
Martin Gräßlin
e49345872c
Add high-level functions for <push|pop|mult>Matrix.
...
All methods are no-ops for GLES which allows to use them from
effects without checks for GLES.
2011-01-30 14:12:03 +01:00
Martin Gräßlin
460ca2729a
Make KWin-GLES branch compile with desktop GL
2011-01-30 14:12:03 +01:00
Martin Gräßlin
7adc29efd7
Remove warnings when building with GLES
2011-01-30 14:12:03 +01:00
Martin Gräßlin
4e36027924
Drop unused bindAttribute Location function.
2011-01-30 14:12:03 +01:00
Martin Gräßlin
990001c5d7
Drop GLVertexBuffer::useShader.
...
The vertex buffer implementation uses the shader manager to decide
whether core painting should be used or not. Shader manager is only
used by shaders using vertex attributes instead of gl_Vertex etc.
2011-01-30 14:12:02 +01:00
Martin Gräßlin
a4e4752109
Combine built-in vertex with custom fragment shader
...
ShaderManager supports a new concept to load just a fragment shader from file
and use a built-in shader for the vertex shader. This allows an effect to use
a custom fragment shader.
2011-01-30 14:12:02 +01:00
Martin Gräßlin
1ba818044f
Read a matrix uniform back from shader.
...
Might require additions to kwinglutils_func in desktop profile
2011-01-30 14:12:01 +01:00
Martin Gräßlin
cab9154723
Simple vertex shaders use projection matrix and offset
2011-01-30 14:12:01 +01:00