Commit Graph

152 Commits (e1c6433c8e168a9ad586cfc93a81e8f929ee5d88)

Author SHA1 Message Date
Rivo Laks ae4bc5c53d - Call GLTexture ctor
- Adjust texture lod bias after texture's been created (it's not created in init())

svn path=/trunk/KDE/kdebase/workspace/; revision=704983
2007-08-26 19:47:18 +00:00
Rivo Laks a7ab423f93 Use texture lod bias when available to make trilinear-filtered windows look a bit sharper
svn path=/trunk/KDE/kdebase/workspace/; revision=704372
2007-08-24 18:45:08 +00:00
Luboš Luňák d846a1e8a9 Use always float as the floating point type for compositing
(http://lists.kde.org/?l=kwin&m=118493073424327&w=2).


svn path=/trunk/KDE/kdebase/workspace/; revision=700026
2007-08-14 15:22:23 +00:00
Luboš Luňák 5a50381e1f Move the shader used for painting to WindowPaintData, as it's
more related to one painting than to a window.


svn path=/trunk/KDE/kdebase/workspace/; revision=698576
2007-08-10 11:26:58 +00:00
Laurent Montel 994c800d79 Adapt to new KWarning/kFatal/kDebug api
svn path=/trunk/KDE/kdebase/workspace/; revision=695877
2007-08-03 06:59:24 +00:00
Luboš Luňák ac42ba0b4f A simple solution for alpha channel hacks - ignore them :).
The 'ignore ARGB visuals' option from Kompmgr probably doesn't make
much sense, those (usually old) apps can be run with XLIB_SKIP_ARGB_VISUALS=1 set.
Also remove the alpha clear hack used for decorations - I think decorations
instead should be fixed not to "unintentionally" have alpha set.


svn path=/trunk/KDE/kdebase/workspace/; revision=689916
2007-07-19 14:23:11 +00:00
Luboš Luňák 22c8626868 Add a TODO note.
svn path=/trunk/KDE/kdebase/workspace/; revision=689904
2007-07-19 12:53:14 +00:00
Luboš Luňák e1c5f18414 Separate rendering for decoration and window contents, they can have
different opacity (opacity only for decoration option).


svn path=/trunk/KDE/kdebase/workspace/; revision=689855
2007-07-19 10:07:49 +00:00
Luboš Luňák ea944065c7 Arghl, this is not static const, it changes.
svn path=/trunk/KDE/kdebase/workspace/; revision=689136
2007-07-17 18:14:17 +00:00
Luboš Luňák f1108dd13a Let's say the copy buffer hack for old nvidia drivers is not necessary these days.
svn path=/trunk/KDE/kdebase/workspace/; revision=689095
2007-07-17 16:01:07 +00:00
Luboš Luňák 7b054df213 More debug info about possible initialization failures.
svn path=/trunk/KDE/kdebase/workspace/; revision=688960
2007-07-17 10:38:12 +00:00
Stephan Kulow 19d0dab807 init it with something. Even though it looks like it should
rather continue? (CID 3919)

svn path=/trunk/KDE/kdebase/workspace/; revision=688152
2007-07-15 08:13:04 +00:00
Philip Falkner 1fcb1967fe Zack's receent patch to Qt defaulting to ARGB visuals where possible
exposed a bug in our (ab)use of QX11Info::appDepth().  Make sure that
our buffers match the depth of the root window.

Thanks to Fredrik for the hint about DefaultDepth().


svn path=/trunk/KDE/kdebase/workspace/; revision=686998
2007-07-12 16:50:52 +00:00
Luboš Luňák 5faa397849 Vertex redesign - redo the way windows are split into smaller parts
for use in effects (and not only). Now a list of window quads (=window areas)
is created at the beginning of the paint pass, prepaint calls can modify
the split itself (i.e. divide it into more parts). The actual paint calls
can then modify these quads (i.e. transform their geometry). This will allow
better control of how the split is done and also allow painting e.g. only
the decoration differently. Still work in progress, but it works.
Also pass data to prepaint functions in a struct, as there is
already quite a number of them.


svn path=/trunk/KDE/kdebase/workspace/; revision=684893
2007-07-07 14:01:32 +00:00
Philip Falkner c2ff6a4d7a Make sure to unbind the texture in tfp_mode when the underlying pixmap
is discarded.  Windows that have previously been mapped and unmapped now
update properly when mapped again.


svn path=/trunk/KDE/kdebase/workspace/; revision=683977
2007-07-05 19:59:55 +00:00
Luboš Luňák cdb2d046c3 Always rebinding should not make sense anymore.
svn path=/trunk/KDE/kdebase/workspace/; revision=677309
2007-06-18 21:24:01 +00:00
Luboš Luňák 4040e9be58 Add a hack to make it work with XGL.
svn path=/trunk/KDE/kdebase/workspace/; revision=677300
2007-06-18 21:14:18 +00:00
Luboš Luňák d9583cd3f6 Option for strict binding: kwinrc:Translucency:GLStrictBinding .
Non-nvidia users will probably need it set to true with TFP.


svn path=/trunk/KDE/kdebase/workspace/; revision=676673
2007-06-17 12:17:03 +00:00
Luboš Luňák 9c31c4555c I apparently misunderstood the semantics of texture_from_pixmap a bit - rebind
only when the compositing pixmap changes (as in: a new one), not when its contents
change. This finally makes TFP faster than SHM (70% vs 45% of non-composited
performance) and should about match Compiz/Beryl. After this change also strict
binding may finally make sense.


svn path=/trunk/KDE/kdebase/workspace/; revision=676667
2007-06-17 12:02:16 +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
Martin Koller 240b663df8 make compile on gcc-3.3.3
svn path=/trunk/KDE/kdebase/workspace/; revision=673195
2007-06-09 10:48:12 +00:00
Luboš Luňák 51107c77b7 We don't use stencil or depth buffer, so best configs are without those.
svn path=/trunk/KDE/kdebase/workspace/; revision=673164
2007-06-09 07:08:30 +00:00
Luboš Luňák f089923fe2 Sets best values found so far only if the config passes all checks, part II.
svn path=/trunk/KDE/kdebase/workspace/; revision=673163
2007-06-09 07:06:11 +00:00
Luboš Luňák dce6be54ca Fix pixmap leak with strict binding.
svn path=/trunk/KDE/kdebase/workspace/; revision=673154
2007-06-09 06:27:22 +00:00
Luboš Luňák de8fa6c883 Clean up also the overlay window on failure.
svn path=/trunk/KDE/kdebase/workspace/; revision=669838
2007-05-30 15:09:06 +00:00
Luboš Luňák 1caa3f95ed Properly check for all needed extensions and handle gracefully absence.
svn path=/trunk/KDE/kdebase/workspace/; revision=669827
2007-05-30 14:22:09 +00:00
Luboš Luňák 94bbce020a Sets best values found so far only if the config passes all checks.
svn path=/trunk/KDE/kdebase/workspace/; revision=669782
2007-05-30 12:01:34 +00:00
Luboš Luňák fdf4645013 Remove unnecessary calls to initDrawableConfigs().
svn path=/trunk/KDE/kdebase/workspace/; revision=669778
2007-05-30 11:44:16 +00:00
Luboš Luňák fe3e66deb3 No ceilf().
BUG: 145776


svn path=/trunk/KDE/kdebase/workspace/; revision=667286
2007-05-22 12:07:19 +00:00
Philip Falkner 630f5793dc Update SHM mode.
For 16bpp pixmaps, we use GL_RGB and GL_UNSIGNED_SHORT_5_6_5 with
glTex(Sub)Image2D, which means that SHM mode works with 16bpp X
servers.

Also, only create one XShmPixmap per damaged pixmap, instead of one
per (optimised) damage rectangle.  Now we can use GL_RGB textures for
24bpp pixmaps, just like fallback mode does and tfp mode can.


svn path=/trunk/KDE/kdebase/workspace/; revision=659274
2007-04-29 21:22:49 +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
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
Luboš Luňák e3b865cd5f namespace KWinInternal -> KWin - shorter typing of names in gdb, yay
svn path=/branches/work/kwin_composite/; revision=650770
2007-04-05 12:07:35 +00:00
Luboš Luňák 8b5b40e4e8 Shadows. Right not it's only flat black rectangle, but otherwise
everything should work.


svn path=/branches/work/kwin_composite/; revision=646315
2007-03-25 10:48:07 +00:00
Luboš Luňák 81fdcfd20b Beryl has moved to git.
svn path=/branches/work/kwin_composite/; revision=645292
2007-03-22 08:38:30 +00:00
Philip Falkner aa6d8eabc5 Add GLTexture class. This is a convenient wrapper around managing an OpenGL texture, as well as loading an image into it. Includes support for loading from QImage, QPixmap, and a file. Defaults to a GL_TEXTURE_2D target, and will scale image if necessary.
Also add SceneOpenGL::Texture class, based on GLTexture.  Optimised for SceneOpenGL::Window, this adds support for loading from an X Pixmap, as well as taking advantage of texture_from_pixmap/shm when available.  Automatically detects what texture target should be used, so be sure to enableUnnormalizedTexCoords() before painting.

Make SceneOpenGL::Window, BoxSwitchEffect, and ExplosionEffect use the new classes.

svn path=/branches/work/kwin_composite/; revision=645125
2007-03-21 18:14:09 +00:00
Luboš Luňák da02ba11ca Scene*::Window classes are now too complex to be value-based,
allocate them dynamically.


svn path=/branches/work/kwin_composite/; revision=645046
2007-03-21 15:52:42 +00:00
Rivo Laks 19e7ebe1d8 Add shader support.
Effects can use setShader() method to set a custom shader for window rendering.

svn path=/branches/work/kwin_composite/; revision=643131
2007-03-16 13:00:01 +00:00
Luboš Luňák d4a58f4152 QMap -> QHash
svn path=/branches/work/kwin_composite/; revision=642532
2007-03-14 16:50:19 +00:00
Luboš Luňák f6ad1881e1 Support for window thumbnails.
svn path=/branches/work/kwin_composite/; revision=640344
2007-03-07 17:50:33 +00:00
Luboš Luňák e61ecff9b9 Check that getting compositing pixmap of a window succeeded.
It may fail (or "fail") if the window is not mapped or if the geometry
doesn't match, both of which may happen due to the asynchronous
nature of X.


svn path=/branches/work/kwin_composite/; revision=637741
2007-02-27 16:13:34 +00:00
Philip Falkner 8299541652 Add build checks for XComposite, XDamage, XRender, OpenGL, and XShm.
KWin should now build and run with/without any or all of the above.

svn path=/branches/work/kwin_composite/; revision=633387
2007-02-13 23:28:36 +00:00
Rivo Laks de2c5223ee Split window rendering into multiple methods
svn path=/branches/work/kwin_composite/; revision=630472
2007-02-05 14:01:09 +00:00
Philip Falkner f060c3bfbb Improved filtering algorithm. Now fast filtering is used by default, while (depending on SmoothScale in kwinrc) bilinear filtering is used on transformed windows and screens.
Optionally, if SmoothScale is set to 2, trilinear filtering will be attempted instead of bilinear.  This requires GL_ARB_texture_non_power_of_two, GL_EXT_framebuffer_object, and valid mipmaps.

svn path=/branches/work/kwin_composite/; revision=629453
2007-02-02 19:58:35 +00:00
Philip Falkner 66d796002f Add basic mipmapping support for OpenGL; by itself this doesn't do much, but allows further capabilities.
svn path=/branches/work/kwin_composite/; revision=629452
2007-02-02 19:56:18 +00:00
Philip Falkner 1e2d811cea Add support for GL_EXT_framebuffer_object, needed for mipmaps.
svn path=/branches/work/kwin_composite/; revision=629450
2007-02-02 19:55:17 +00:00