kwin/effects/trackmouse
Martin Gräßlin c2a4f81927 Introduce a helper class to automatically push/pop Shaders
The ShaderBinder class can be used for the case that a block of code
should be executed with a given Shader being bound. This is useful for
all the cases where there is a if-block for OpenGL2 execution with a
Shader being pushed in the first line to the ShaderManager and popped in
the last line of the block. With the helper this can be simplified to:

ShaderBinder binder(myCustomShader);

or

ShaderBinder binder(ShaderManager::GenericShader);

The ctor of ShaderBinder pushes the given Shader to the stack and once
the helper goes out of scope it will be popped again from the stack.

In addition the helper can take care of OpenGL 1 compositing, that is it
just does nothing. So it can also be used where there is a shared OpenGL1
and OpenGL2 code path where the Shader should only be pushed in OpenGL2.
This basically removes all the checks for the compositing type before
pushing/popping a Shader to the stack.

REVIEW: 106521
2012-09-29 15:33:57 +02:00
..
data polish track mouse effect, add xrender implementation 2012-05-02 21:56:18 +02:00
CMakeLists.txt Use KConfigXT in TrackMouse Effect 2012-09-14 10:39:27 +02:00
trackmouse.cpp Introduce a helper class to automatically push/pop Shaders 2012-09-29 15:33:57 +02:00
trackmouse.desktop SVN_SILENT made messages (.desktop file) 2012-06-12 17:07:51 +02:00
trackmouse.h Effects can provide support information through properties 2012-08-17 17:49:49 +02:00
trackmouse.kcfg Use KConfigXT in TrackMouse Effect 2012-09-14 10:39:27 +02:00
trackmouse_config.cpp Use KConfigXT in TrackMouse Effect 2012-09-14 10:39:27 +02:00
trackmouse_config.desktop SVN_SILENT made messages (.desktop file) 2012-05-28 11:08:19 +02:00
trackmouse_config.h Use KConfigXT in TrackMouse Effect 2012-09-14 10:39:27 +02:00
trackmouse_config.ui Use KConfigXT in TrackMouse Effect 2012-09-14 10:39:27 +02:00
trackmouseconfig.kcfgc Use KConfigXT in TrackMouse Effect 2012-09-14 10:39:27 +02:00