Commit graph

35 commits

Author SHA1 Message Date
Martin Gräßlin
b9bdf83159 Drop some more unused code in kwinglutils.
svn path=/trunk/KDE/kdebase/workspace/; revision=1155061
2010-07-26 20:32:25 +00:00
Martin Gräßlin
6641ac5648 GLRenderBuffer supports legacy painting if VBOs are not available.
This gives us one API for both legacy and modern painting.
All glRenderGeometry* calls are deprecated as they use quads and
legacy painting.

svn path=/trunk/KDE/kdebase/workspace/; revision=1153911
2010-07-24 07:32:42 +00:00
Martin Gräßlin
d732e2f56c On the road to more efficient painting: introducing new class GLVertexBuffer which encapsulates a vertex buffer object.
Used by GLTexture if GPU supports VBO.

svn path=/trunk/KDE/kdebase/workspace/; revision=1151906
2010-07-19 20:53:32 +00:00
Fredrik Höglund
cb97465581 Add convenience accessors to GLTexture for the width and height.
svn path=/trunk/KDE/kdebase/workspace/; revision=1099477
2010-03-05 17:09:22 +00:00
Lucas Murray
3db33763cf Shader optimizations. Patch provided by Robin Burchell.
svn path=/trunk/KDE/kdebase/workspace/; revision=1007918
2009-08-06 13:57:09 +00:00
Martin Gräßlin
d7665af4f0 Texture width and height is stored in GLShader and the uniform value is set during prepareShaderRenderStates in scene_opengl. So the effects do not have to set the uniform manually. This is useful as other effects can still set this uniform if something different is rendered with a different texture width/height (e.g. shadows or thumbnails). When the window is finally rendered the original value set by the effect is definatelly used.
First effect to use this new way to set texture width and height is invert effect.

svn path=/trunk/KDE/kdebase/workspace/; revision=959835
2009-04-27 11:07:15 +00:00
Lucas Murray
1e91a66fd2 Added support for unstyled and frameless EffectFrames. Converted all
effects that display text or boxes to use the class. Minor speed
increase in XRender mode for those effects and a massive increase in
OpenGL mode (Double framerate in present windows in my case).

svn path=/trunk/KDE/kdebase/workspace/; revision=929951
2009-02-22 13:04:16 +00:00
Lucas Murray
e03748fba7 Added EffectFrame, a helper class that creates, manages and caches a
Plasma frame object. There are two ways to use this class: The first is
in "static" mode which gives the frame a set geometry and will not
change, the second is an automatic mode that creates the smallest
possible frame around the specified contents. Contents can either be
normal text and/or a QPixmap, useful for displaying the caption and icon
of the currently highlighed window.
Known bugs:
 - Does not detect Plasma theme changes, known to be in the Plasma
   library.
 - Slight graphical glitches, known to be in Qt 4.5.0 RC1.
Untested:
 - What happens when there is no Plasma theme installed.

svn path=/trunk/KDE/kdebase/workspace/; revision=929324
2009-02-21 04:53:13 +00:00
Luboš Luňák
8e5f95a9d6 Make a more explicit distinction between using normalized and non-normalized
texture coordinates - it cost me hours to find out why something was misdrawing :(.


svn path=/trunk/KDE/kdebase/workspace/; revision=854546
2008-08-29 18:54:28 +00:00
Luboš Luňák
b840fa0792 Disable copying by value for GLTexture, as it wouldn't work anyway.
CCMAIL: Rivo Laks <rivolaks@hot.ee>


svn path=/trunk/KDE/kdebase/workspace/; revision=805056
2008-05-07 13:05:46 +00:00
Luboš Luňák
f77561ce65 Don't discard window texture when only the shape changes but the window
geometry actually stays the same. Avoids large number of rebinds (with no
strict binding) with the launch feedback icon.


svn path=/trunk/KDE/kdebase/workspace/; revision=787948
2008-03-20 10:05:41 +00:00
Luboš Luňák
cff2b0e6cd Abstract paint clipping into PaintClipper helper class that allows
stacking of clipping regions.
(http://lists.kde.org/?l=kwin&m=120138051215450&w=2)
BUG: 156798


svn path=/trunk/KDE/kdebase/workspace/; revision=779045
2008-02-25 11:32:21 +00:00
Dirk Mueller
de19077399 header cleanness++
svn path=/trunk/KDE/kdebase/workspace/; revision=770658
2008-02-04 10:24:45 +00:00
Luboš Luňák
3c3b5f4b2d Split kdecoration and kwineffects libraries as two modules for doxygen.
svn path=/trunk/KDE/kdebase/workspace/; revision=762274
2008-01-16 18:13:24 +00:00
Luboš Luňák
110f76ecd8 Change some of the debug messages to warnings, so compositing setup failures
show up also in release builds.


svn path=/trunk/KDE/kdebase/workspace/; revision=762175
2008-01-16 12:44:45 +00:00
Luboš Luňák
bb433ac40e No longer include config*.h files in installed headers.
Also slightly redo the #define's for effects, now it's:
- #ifdef KWIN_HAVE_COMPOSITING to check whether there's any compositing support at all
- #ifdef KWIN_HAVE_OPENGL_COMPOSITING to check for OpenGL-based compositing
- #ifdef KWIN_HAVE_XRENDER_COMPOSITING the same for XRender
CCMAIL: kwin@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=749628
2007-12-17 14:14:53 +00:00
Luboš Luňák
01bf6cbb4c License cleanup - add headers where missing, be explicit about GPL
being v2+ (right now it says just GPL, which according to GPL itself
means any GPL). Decoration clients will come later.
CCMAIL: kwin@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=742302
2007-11-27 19:40:25 +00:00
Arto Hytönen
f3fbc3665b explicit ctors
svn path=/trunk/KDE/kdebase/workspace/; revision=707717
2007-09-02 19:11:09 +00:00
Rivo Laks
cc2600100c Add a method to render round box with a dark edge and use it for alt-tab's frame.
Now the frame has a slight edge/border around it which makes it look much better IMHO.

svn path=/trunk/KDE/kdebase/workspace/; revision=704310
2007-08-24 15:44:52 +00:00
Rivo Laks
42a4d364c2 Add a generic function to render a box with rounded corners.
Algorithm is basically same as for shadow, perhaps even shadow will use it.

svn path=/trunk/KDE/kdebase/workspace/; revision=683514
2007-07-04 20:33:35 +00:00
Rivo Laks
424f906ab2 - Add optional color argument to renderGLGeometry() functions. If specified, it's used as vertex colors
array when rendering.
- Rearrange some renderGLGeometry() parameters.
- Don't use opengl arrays and glDrawArrays() when rendering a small number of vertices since in this
  case overhead of enabling/disabling the array is too big. Use immediate mode instead in such case.

svn path=/trunk/KDE/kdebase/workspace/; revision=675467
2007-06-14 10:05:51 +00:00
Luboš Luňák
acf4e9ce8e Work around gcc-3.3.3's problem with resolving namespaced symbols.
svn path=/trunk/KDE/kdebase/workspace/; revision=673984
2007-06-11 14:35:09 +00:00
Luboš Luňák
8d9f931cfd Build properly without OpenGL/XRender.
svn path=/trunk/KDE/kdebase/workspace/; revision=662052
2007-05-07 11:46:01 +00:00
David Faure
38099ef7e5 Major config.h cleanup, moved much stuff to config-X11.h and to config-fish.h
svn path=/trunk/KDE/kdebase/workspace/; revision=661060
2007-05-04 13:51:35 +00:00
Luboš Luňák
f52b8e48cd branches/work/kwin_composite becomes new trunk kwin.
svn path=/trunk/KDE/kdebase/workspace/; revision=659202
2007-04-29 17:35:43 +00:00
Luboš Luňák
2b7e1f4993 Remove kwin, kwin_composite will become new trunk kwin, missing merges
from trunk will be merged in.


svn path=/trunk/KDE/kdebase/workspace/; revision=659200
2007-04-29 17:34:49 +00:00
Rivo Laks
17ae1620ac Little clarifying API doc for nearestPowerOfTwo().
svn path=/branches/work/kwin_composite/; revision=659150
2007-04-29 15:31:57 +00:00
Rivo Laks
f00d1745ed Add static GLRenderTarget::supported() and make effects use it instead of checking for FBO extension
themselves.
Fix memory leak in Test_FBO effect.

svn path=/branches/work/kwin_composite/; revision=658804
2007-04-28 14:38:06 +00:00
Rivo Laks
24c8663923 Add GLShader dtor (fixes memory leak).
Also fix multiple memory leaks in effects.

svn path=/branches/work/kwin_composite/; revision=658761
2007-04-28 13:19:36 +00:00
Rivo Laks
6e62dcb922 Add GLTexture::setWrapMode() call to set texture's OpenGL wrap mode.
Liquid demo effect now sets wrap mode to CLAMP to ensure that the texture won't wrap at edges
  of the screen, which would make other side of the screen visible there.

svn path=/branches/work/kwin_composite/; revision=658748
2007-04-28 12:25:54 +00:00
Laurent Montel
67f6750ab3 Remove not necessary include
svn path=/trunk/KDE/kdebase/workspace/; revision=656776
2007-04-22 11:14:24 +00:00
Luboš Luňák
ffc75a2214 GLTexture::render(), to render to a given QRect
svn path=/branches/work/kwin_composite/; revision=656521
2007-04-21 16:12:03 +00:00
Luboš Luňák
cd98bc12d5 Shared implementation of rendering gl geometry.
svn path=/branches/work/kwin_composite/; revision=656516
2007-04-21 16:02:19 +00:00
Rivo Laks
cc1a7a9eca Add GLRenderTarget class.
The render target is used to render the scene (or part of it) onto texture. This texture can then be used
  e.g. to do some postprocessing.
  Demo effect coming soon.

Move checkGLError() to kwineffects.*
Add GLTexture ctor which takes width and height and creates an empty texture (to be used with
  GLRenderTarget to render onto it)

svn path=/branches/work/kwin_composite/; revision=655489
2007-04-18 15:22:13 +00:00
Rivo Laks
0353f3376e Make effects actual plugins, so it's possible to load them on runtime.
There's also a kwineffects library now, containing the effects API, which makes it possible to write
  third-party effects.
API isn't complete yet and for now just two effects have been converted but I'm working on it :-)

svn path=/branches/work/kwin_composite/; revision=652226
2007-04-10 13:02:08 +00:00
Renamed from glutils.h (Browse further)