Commit Graph

81 Commits (73153c861c242813f9439c17a37fb49ee60bf221)

Author SHA1 Message Date
Martin Gräßlin 050ea5010b Remove PaintClipper from Cube
Seems to be a relict from the time when we scaled the cube on one screen.
2011-07-05 20:18:19 +02:00
Philipp Knechtges 827f9219be kwin: add support for y-inverted textures to the Cube effect 2011-07-04 17:50:12 +02:00
Martin Gräßlin d0e57a57cc Fix incorrect rendering of Cube Wallpaper with GL2
Textures should be rendered with simple shader when not being transformed.
2011-06-15 21:40:15 +02:00
Martin Gräßlin 32adc59e4b Use cap shader to render area between screens in cube
This fixes most of the rendering issues with cube in multi
screen setups and GLSL backend. For cylinder and sphere the
rendering of areas between screen is currently disabled if
using the GLSL backend. It needs adjustments to use another
vertex shader. Not sure if it is worth the effort.
2011-05-01 11:28:07 +02:00
Martin Gräßlin d396ce990b Fix untextured cube caps with GLSL 2011-05-01 11:28:07 +02:00
Martin Gräßlin 57c101c04d Fix sphere shader 2011-04-29 14:12:48 +02:00
Martin Gräßlin 9586c0b8d4 Fix broken cube rotation with GL2 backend 2011-04-27 15:13:26 +02:00
Martin Gräßlin b52975a57e Merge branch 'libkwineffects'
The branch contains the first step in reworking the kwineffects
library. This includes:
* replacing virtuals by signals and slots
* dropping some unused methods
* remove KWin::TimeLine

More to come.

Conflicts:
	kwin/workspace.cpp
2011-03-16 19:46:59 +01:00
Martin Gräßlin f213b7da70 Drop KWin::TimeLine from kwineffects
The KWin::TimeLine class was only a small wrapper around QTimeLine
without adding anything to QTimeLine what is not present in QTimeLine.
The initial idea was to make it possible to provide more curve shapes.
This is now obsoleted by Qt shipping more useful curves with QTimeLine.

So let's clean up a little bit and use QTimeLine directly instead of
the small wrapper.

All effects are adjusted to use QTimeLine directly.
2011-03-14 22:50:05 +01:00
Martin Gräßlin 39ab2cf29e MouseChanged becomes a signal 2011-03-12 14:37:30 +01:00
Martin Gräßlin 15757e953a TabBox uses signals to notify the effects
EffectsHandlerImpl just forwards the signals from TabBox. In order
to have a valid pointer to the TabBox, the TabBox is now initialized
before compositing in Workspace.
2011-03-06 12:15:16 +01:00
Martin Gräßlin a728823fbe Fix passing matrixes to the shaders
QMatrix4x4 accepts data in row-major order, but returns them in
column-major order, which is not documented and because of that
I expected them to be in row-major order.
This commit fixes it and rewrites the shaders to apply the matrix
multiplications in the right order.
REVIEW: 100759
2011-03-06 09:13:31 +01:00
Martin Gräßlin 0827c2903b Use GLPlatform to decide whether shaders are supported
Dropping the static methods from GLShader and use supports()
where it was used before.
2011-02-19 11:08:43 +01:00
Fredrik Höglund af92a4efd4 kwin: Rename sample to sampler in all shaders
A sample is not the same thing as a sampler.
2011-02-17 19:19:40 +01:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Martin Gräßlin d9fb2bd789 Cylinder and Sphere ported to new rendering stack 2011-01-30 14:12:06 +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 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 7adc29efd7 Remove warnings when building with GLES 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 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 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
Luboš Luňák d467d26530 Do not introduce such generic indentifiers like None or Styled
into KWin's global namespace. Morever None already kind of clashes with X's None.
CCMAIL: kde@martin-graesslin.com


svn path=/trunk/KDE/kdebase/workspace/; revision=1170588
2010-09-01 14:15:06 +00:00
Martin Gräßlin e2eebb6503 Refactoring of EffectFrame: EffectFrame becomes an interface just like EffectsHandler and EffectWindow and a concrete EffectFrameImpl in core.
Rendering of the EffectFrame is moved into the scene as Scene::EffectFrame with a concrete implementation in SceneXrender and SceneOpenGL.
A factory method for an EffectFrame is added to the EffectsHandler, which is used by the effects.
Next step: pass the EffectFrame through all effects, so that effects can transform, blur, invert whatever it.

svn path=/trunk/KDE/kdebase/workspace/; revision=1151271
2010-07-18 16:32:37 +00:00
Martin Gräßlin 782d08e0b0 Don't hover sticky windows as that cannot work.
BUG: 203086

svn path=/trunk/KDE/kdebase/workspace/; revision=1105593
2010-03-20 17:54:04 +00:00
Martin Gräßlin d2e9e039bd It helps to trigger a repaint if the cube should rotate.
BUG: 208520

svn path=/trunk/KDE/kdebase/workspace/; revision=1042447
2009-10-29 20:21:09 +00:00
Martin Gräßlin 10f0a1c3af Only use cube in static desktop list. Doesn't make sense in random order.
CCBUG: 208520

svn path=/trunk/KDE/kdebase/workspace/; revision=1042389
2009-10-29 18:12:10 +00:00
Martin Gräßlin 1ae6878e76 Providing a way to render something inside the cube. Added as an example the glxgears to the test effects.
svn path=/trunk/KDE/kdebase/workspace/; revision=1038868
2009-10-22 07:06:44 +00:00
Lucas Murray 20f1a79d04 Less warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1031490
2009-10-05 09:47:13 +00:00
Martin Gräßlin 1e1cf86dc7 Initialize a variable, which could be read before it has been written to in a very, very unlikely case, with a useful value.
CCBUG: 196025

svn path=/trunk/KDE/kdebase/workspace/; revision=1004621
2009-07-30 16:01:25 +00:00
Martin Gräßlin 102b3c791b EffectFrame should be freed at end of cube animation, not at start of stop animation.
svn path=/trunk/KDE/kdebase/workspace/; revision=1003585
2009-07-28 12:20:19 +00:00
Martin Gräßlin af108ed88f Remove default shortcuts for cylinder and sphere. The effect isn't enabled by default and cylinder and sphere are not so important that it qualifies for a default shortcut.
svn path=/trunk/KDE/kdebase/workspace/; revision=1001760
2009-07-24 07:45:49 +00:00
Martin Gräßlin d5c7fa7957 When zooming we have to recompile the rotation GlList as zoom factor is required to calculate the rotation.
svn path=/trunk/KDE/kdebase/workspace/; revision=971915
2009-05-23 17:18:20 +00:00
Martin Gräßlin a3a35f92bb Mirror the bottom cube cap in y direction. That makes cube a little bit more realistic.
svn path=/trunk/KDE/kdebase/workspace/; revision=971753
2009-05-23 12:40:04 +00:00
Martin Gräßlin 20a7f2079c Use OpenGL to modify the cube cap instead of manipulating the pixels of the source QImage. Don't know why I did it that way.
The cap color is used as a background for tranclucent pixels and opacity is set to cube opacity. Changed to clamp to border and using cap color as border color.

svn path=/trunk/KDE/kdebase/workspace/; revision=962425
2009-05-02 13:37:59 +00:00
Martin Gräßlin 37f48027f2 New cube reflection which moves reflection down to touch the cube in its lowest point. Thanks to Michal Srb for the patch. It' really great.
There are two small todos: when mixing manual (mouse) rotation with cursor key rotation or zooming the reflection becomes wrong.
FEATURE: 178611

svn path=/trunk/KDE/kdebase/workspace/; revision=962205
2009-05-01 18:23:53 +00:00
Martin Gräßlin 144f578a5d Cylinder and Sphere use new setting of texture width and height. For that renaming windowWidth and windowHeight to textureWidth/Height. So finally the new argb decos work with cylinder and sphere.
svn path=/trunk/KDE/kdebase/workspace/; revision=959842
2009-04-27 11:35:35 +00:00
Martin Gräßlin 3e56e98281 Use opacity, brighness and saturation in shader for cylinder and sphere. That allows to have dimmed windows in these effects and correct window opacity.
svn path=/trunk/KDE/kdebase/workspace/; revision=956595
2009-04-20 11:07:47 +00:00
Albert Astals Cid e74249083f const & for foreach 'iterators'
svn path=/trunk/KDE/kdebase/workspace/; revision=952187
2009-04-11 11:11:50 +00:00
Martin Gräßlin 69b8e33fce Check for the global shortcut in the effects so that the shortcut actually toggles the effect. This is a workaround needed because the keyboard grab disables the global shortcut.
FEATURE: 156155

svn path=/trunk/KDE/kdebase/workspace/; revision=946787
2009-03-30 11:27:57 +00:00
Martin Gräßlin 92484573f2 Effects can be activated at more than one electric border.
FEATURE: 180548

svn path=/trunk/KDE/kdebase/workspace/; revision=946404
2009-03-29 12:57:20 +00:00
Martin Gräßlin f232a830aa Don't use the gl lists when a new window is added. This prevents the added window becoming black.
svn path=/trunk/KDE/kdebase/workspace/; revision=941274
2009-03-19 10:22:04 +00:00