Commit Graph

7882 Commits (175b45c5def9ddc0c168d00b1d3497c24ecccb19)

Author SHA1 Message Date
Martin Gräßlin a478fc7ff3 Allow creating shaders from code directly. 2011-01-30 14:12:05 +01:00
Martin Gräßlin bf56d17aee Compile fix for ShowFPS 2011-01-30 14:12:05 +01:00
Martin Gräßlin 0f7ebac00e Explosion portet to GLES.
I'm not completely sure if this is how the effect should look like.
But I cannot verify, it fails on fglrx and cannot find a video on Youtube.
2011-01-30 14:12:05 +01:00
Martin Gräßlin b7ee35bba1 Invert effect ported to GLES.
It uses a generic vertex shader and because of that it needs to
mark all windows which are inverted as transformed.
There is currently a conflict with Lanczos (or thumbnails) and with
the desktop in cube effect.
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 6cd6883d8c Remove too strong error checks.
That should never have been committed, it was just for finding an error.
2011-01-30 14:12:05 +01:00
Martin Gräßlin 863726a085 LookingGlass ported to GLES.
LookingGlass does not inherit ShaderEffect any more and uses just a
fragment shader. It still renders to a FBO, this could probably be
improved.
2011-01-30 14:12:05 +01:00
Martin Gräßlin 75e926a6d7 Here comes the ported Magnifier 2011-01-30 14:12:05 +01:00
Martin Gräßlin 5d74f9ece7 StartupFeedback ported to GLES. 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 c5c318a342 Screenshot Effect ported to GLES 2011-01-30 14:12:05 +01:00
Martin Gräßlin 22d7c6c5f1 ShowFPS effect ported to GLES 2011-01-30 14:12:04 +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 764338e042 TaskbarThumbnails should say that it needs transformed windows.
Fixes a nice transformation issue when using thumbnails after cube effect.
2011-01-30 14:12:04 +01:00
Martin Gräßlin 78c4c7a86e Lanczos filter available in GLES.
It uses a default vertex shader, so the existing shader can be dropped.
2011-01-30 14:12:04 +01:00
Martin Gräßlin c6dd3690f5 Don't clip when rendering to FBO. 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 4c8c3060bf Merge together paintBackground and paintGenericScreen 2011-01-30 14:12:04 +01:00
Martin Gräßlin e5eed55c51 PerformPaint uses QMatrix4x4 for legacy GL.
And another piece of code get's merged between desktop GL and ES.
2011-01-30 14:12:04 +01:00
Martin Gräßlin 2e0385101a Less ifdef in paintWindow. CleanerCode++
Using the QMatrix4x4 allows to make everything runtime dependent
and not a compile time switch.
2011-01-30 14:12:04 +01:00
Martin Gräßlin 802dd6b5fe Cache the matrix for cube cap mirroring 2011-01-30 14:12:04 +01:00
Martin Gräßlin fe614119e5 Reflected cube uses QMatrix4x4 2011-01-30 14:12:03 +01:00
Martin Gräßlin 8c4db8f734 Say goodbye to Display Lists in cube.
Rotation is now only handled by the QMatrix4x4 m_rotationMatrix,
so no more need for display lists. Resulting in a cleaner code without
differences between OpenGL 1.x and 2.x/GLES.
2011-01-30 14:12:03 +01:00
Martin Gräßlin 6b88cdf36a Cube uses new high-level push/pop/multiply for caps.
For OpenGL 1.x cube caps are now rendered using the capMatrix
instead of using glTranslate/glRotate et al. One source base to
rule all GL versions.
2011-01-30 14:12:03 +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 db7a072c2b Blending is also useful in legacy mode... 2011-01-30 14:12:03 +01:00
Martin Gräßlin 8d196da880 Render empty areas in multiscreen with VBO. 2011-01-30 14:12:03 +01:00
Martin Gräßlin ea08ae0929 Fix rebasing failure 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 2d40f73530 Fix unstyled effect frames 2011-01-30 14:12:02 +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 7ca5d4dc6b Fade in/out cube caps during start/stop animation. 2011-01-30 14:12:02 +01:00
Martin Gräßlin ef7fd87d65 Mirror bottom cube cap in shader. 2011-01-30 14:12:02 +01:00
Martin Gräßlin 75a1ee7aa8 CubeCaps back in GLES mode.
This includes quite some refactoring. For the cube cap a VBO is used
instead of glLists and all the required transformations are moved into
paintCap() which makes paintScreen more clean.
Currently the mirroring of bottom texture is still missing and cylinder
and sphere caps are not yet ported to using VBO.
I wouldn't be surprised if it is broken for legacy GL atm.
2011-01-30 14:12:02 +01:00
Martin Gräßlin e5b6baeda9 Reflection plane in cube effect and GLSL 2011-01-30 14:12:02 +01:00
Martin Gräßlin ad070909a3 Reflection plane in Coverswitch and GLES
CoverSwitch uses new concept of combining a custom fragment shader with the
built-in generic vertex shader. This shader is used to render the reflection
plane on top of the reflected windows.
The fragment shader uses two uniform colors for front and back and interpolates
between them based on the texcoords (which are not used for texture lookup).
The reflection plane vertices could be buffered.
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 054c8a62a6 Reflected windows in coverswitch
Reflection plane is still missing
On special request I added showing the reflected windows during the animation when the shader is used
2011-01-30 14:12:02 +01:00
Martin Gräßlin ec1ec18260 Bring back some configuration interfaces 2011-01-30 14:12:02 +01:00
Martin Gräßlin 82b8faadab Welcome back Cube effect
Currently working:
* cube slide
* basic cube
* rotations
* reflections

Not working:
* Cube Inside effects
* Reflection plane (needs to be done in a shader)
* cube caps
* sphere/cylinder
* filled in areas in multi desktop
2011-01-30 14:12:01 +01:00
Martin Gräßlin 9cfdeb1e2d Set always window transformaton to generic shader 2011-01-30 14:12:01 +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 33dff065fc MouseMark ported to GLES 2011-01-30 14:12:01 +01:00
Martin Gräßlin 18814c66a3 Coverswitch works on GLES.
No multi-screen, no reflections yet
2011-01-30 14:12:01 +01:00
Martin Gräßlin 5dfa8becb5 FlipSwitch ported to GLES.
Multi-screen mode not yet included
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
Martin Gräßlin 5f9b75b0c0 All KCMs build again 2011-01-30 14:12:01 +01:00