Commit Graph

256 Commits (2e0385101ac67ce4a601dfc4f521575dfad45e13)

Author SHA1 Message Date
Martin Gräßlin 7adc29efd7 Remove warnings when building with GLES 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 9cfdeb1e2d Set always window transformaton to generic shader 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 e4b26daef5 And use shared VBO for windows 2011-01-30 14:12:00 +01:00
Martin Gräßlin d2cfeef8ae Scene uses ShaderManager 2011-01-30 14:12:00 +01:00
Martin Gräßlin d12c4e58fd Support new translate for textures 2011-01-30 14:11:58 +01:00
Martin Gräßlin ae95ab0c43 Adding color to VBO.
A color can be specified to render the geometry of the VBO.
For legacy painting glColor is used, for shader a uniform is set.
In order to allow rendering without texcoords, it is possible to pass
a null pointer as texcoords.
Shader added to scene which just renders a colored geometry without texturing.
2011-01-30 14:11:58 +01:00
Martin Gräßlin f925352e73 Don't crash if scene shader is not available 2011-01-30 14:11:58 +01:00
Martin Gräßlin eb7d06d22f Adding a generic scene shader able to handle transformation
Currently only window transformations are supported.
2011-01-30 14:11:57 +01:00
Martin Gräßlin ea12f95b27 Support setting y_inverted for Texture.
At least needed for the pixmaps loaded by EGL.
Should be save on GLX as well, if not it needs fixing
2011-01-30 14:11:57 +01:00
Martin Gräßlin 5804417acc And here comes the working OpenGL ES backend 2011-01-30 14:11:57 +01:00
Martin Gräßlin 537b06a9ee Move glx and egl code into own files 2011-01-30 14:11:57 +01:00
Martin Gräßlin b8d068088b Fix linker errors in scene 2011-01-30 14:11:56 +01:00
Martin Gräßlin 5fae85f2a5 Scene OpenGL compiles with ES
It's mostly just ifdef away everything that cannot work.
Needs to be split into a scene_xgl and scene_egl.
2011-01-30 14:11:56 +01:00
Martin Gräßlin 6cc19ebc7d OpenGL rendering debug
Renders same geometry with polygon mode lines and the shader colorizes the fragments.
Enabled with environment variable KWIN_GL_DEBUG=1
2011-01-30 14:11:55 +01:00
Martin Gräßlin 56ce39def8 Core profile compatible basic scene rendering.
Adds a shader to render an untransformed scene. renderGLGeometry is not used any more and replaced by generated triangles stored in a GLVertexBuffer.
The GLVertexBuffer has a new attribute to decide whether a core profile compatible rendering has to be performed.
Currently windows and EffectFrames can make use of the new shader.
The shader contains a debug mode which colours all rendered fragments in green. It is currently enabled in scene_opengl.
Rendering transformed geometries (without shader) is currently broken.
2011-01-30 14:11:55 +01:00
Thomas Lübking 337e1eac18 revert vsync strategy, fix timeouts
differecens to patch atteched to 258971:
- removed debug statements
- fixed indention...
- NON vsync strategy does not rely on the estimation, but on the time passed since the last repaint trigger, allowing a precise framerate

CCBUG: 258971


svn path=/trunk/KDE/kdebase/workspace/; revision=1210445
2010-12-31 13:14:11 +00:00
Thomas Lübking e2dcfff601 commiting http://svn.reviewboard.kde.org/r/6120/#review9304
this should improve v'syncing, maybe v'synced "smoothness"
remaining and exposed issue are "dirty textures" w/o damage events (see the requst description)
can be diminished by increasing MaxFPS above the fastest update (or shadowed below the slowest one)
CCBUG: 258971

svn path=/trunk/KDE/kdebase/workspace/; revision=1207577
2010-12-18 16:51:43 +00:00
Martin Gräßlin bcabc01ecc Fix blend func for shaders
svn path=/trunk/KDE/kdebase/workspace/; revision=1203714
2010-12-05 10:02:47 +00:00
Fredrik Höglund 4a170df503 Revert to always calling glXBindTexImageEXT() before rendering.
The GLX implementation in the X server appears to have a hardcoded limit
to how many pixmaps can be bound to textures simultaneously when using
indirect rendering, which we can end up exceeding with the changes
introduced in r1182198.

BUG: 256359
FIXED-IN: 4.5.5

svn path=/trunk/KDE/kdebase/workspace/; revision=1203578
2010-12-04 16:55:43 +00:00
Thomas Lübking 48447a3d26 avoid recreating effectframes/textures on setPosition; correct position after setAlignment
svn path=/trunk/KDE/kdebase/workspace/; revision=1203489
2010-12-04 10:01:57 +00:00
Thomas Lübking 029f93127f kick trilinear filtering if favor of the lanczos filter (now default, unless blacklisted)
make the scale method configurable and align the UI for GL and Xrender

CCBUG: 243181


svn path=/trunk/KDE/kdebase/workspace/; revision=1195698
2010-11-11 19:53:19 +00:00
Martin Gräßlin ef605d6475 Forward port rev 1195271:
Deactivate OpenGL compositing self-check.
See http://svn.reviewboard.kde.org/r/5774/
CCBUG: 253357

svn path=/trunk/KDE/kdebase/workspace/; revision=1195272
2010-11-10 18:23:04 +00:00
Martin Gräßlin f31d32250f Make EffectFrames work with Nouveau driver.
This worksaround a problem with the nouveau driver causing
the text frames to be incorrectly rendered. We need to keep
the QPixmap around as long as we have a texture created from
that texture.
This applies for the text and the unstyled effect frame. For
the frames generated from Plasma's FrameSvgs it is not required.
Addresses freedesktop.org bug 30286

svn path=/trunk/KDE/kdebase/workspace/; revision=1184458
2010-10-10 11:26:00 +00:00
Fredrik Höglund 3ea508cd8a Specify the texture target explicitly when creating a GLXPixmap.
Prefer the GL_TEXTURE_2D target if the framebuffer configuration indicates
that it's supported.

This fixes a performance problem with the r600g driver.
freedesktop bug 30483.

svn path=/trunk/KDE/kdebase/workspace/; revision=1183978
2010-10-08 22:18:57 +00:00
Fredrik Höglund 15033a9a8e Only call glXBindTexImageEXT() when the contents of the pixmap has changed.
We don't need to do this every time we bind the texture to a GL context,
even with strict binding.

svn path=/trunk/KDE/kdebase/workspace/; revision=1182198
2010-10-03 18:49:36 +00:00
Martin Gräßlin fa78332a3c Fallback to XRender compositing in case of Software Rasterizer.
For Software Rasterizer we never ever want to have OpenGL compositing.
No matter how many config options the user sets it has to be disabled.
Though falling back to XRender makes sense in the case of software
rasterization.

svn path=/trunk/KDE/kdebase/workspace/; revision=1176787
2010-09-18 17:41:07 +00:00
Martin Gräßlin 256a1a79c3 Use pixmaps and TFP for the text and unstyled effect frame.
This solves also some video garbage problems with direct rendering and fglrx.

svn path=/trunk/KDE/kdebase/workspace/; revision=1174408
2010-09-12 10:09:12 +00: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 eabad32cfb Add cross fade support for text and icon to EffectFrame.
This allows an effect to fade between old and new text/icon. As an example it's added to CoverSwitch.
Currently only supported in OpenGL. XRender might be added, but I'm missing an idea for an effect to add it.
Most effects using EffectFrame require OpenGL anyway.

svn path=/trunk/KDE/kdebase/workspace/; revision=1160252
2010-08-07 14:08:34 +00:00
Martin Gräßlin 276e63a134 Really disable the fallback to XRender.
I missed this line in my previous change to disable the fallback which made the fallback happen nevertheless.

svn path=/trunk/KDE/kdebase/workspace/; revision=1157978
2010-08-01 19:23:05 +00:00
Martin Gräßlin 84e8fa4634 Use Texture From Pixmap for the styled EffectFrame
svn path=/trunk/KDE/kdebase/workspace/; revision=1155056
2010-07-26 20:16:54 +00:00
Martin Gräßlin ef79d4c443 Use the normal Plasma selection to highlight the selected window in boxswitch.
So it is more consistent (in KDE newspeak "elegant") with other selections and as a plus we get rid of all the custom rendering code in boxswitch.

svn path=/trunk/KDE/kdebase/workspace/; revision=1155051
2010-07-26 20:00:04 +00:00
Martin Gräßlin 89c0ea0c8d Pass EffectFrame through all effects, so that they can do something with the frame.
E.g. set a shader to invert it.
CCBUG: 241389

svn path=/trunk/KDE/kdebase/workspace/; revision=1154071
2010-07-24 16:29:16 +00:00
Martin Gräßlin 20b711e2e8 Use a VBO for rendering an unstyled effect frame.
svn path=/trunk/KDE/kdebase/workspace/; revision=1153932
2010-07-24 08:04:17 +00:00
Martin Gräßlin fa832b7aa7 Cache the icon texture/picture in EffectFrame and use texture from pixmap to load the data in OpenGL mode. Yeah for less pixmap to image to gltexture conversations.
Some effects (boxswitch and flipswitch) still need to be changed to not set the icon in each frame.

svn path=/trunk/KDE/kdebase/workspace/; revision=1152367
2010-07-20 21:11:03 +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 12918d3ee8 Disabling the fallback to XRender. It's causing more trouble than the benefits.
With Intel drivers currently the self check at KWin startup fails (no idea why) and KWin falls back to XRender. This is probably an explanation for all the complaints about slow kwin in 4.5 and the missing effects. So let's fail and make it possible to restart compositing via systemsettings and alt+shift+f12.
Nevertheless it would be nice to fix the the failing selfcheck...

svn path=/trunk/KDE/kdebase/workspace/; revision=1148315
2010-07-10 08:44:40 +00:00
Martin Gräßlin cfce13e615 Make the new taskbar thumbnail shader work with NVIDIA driver. Therefore the alpha channel has to be added to oqaque windows in scene_opengl.
svn path=/trunk/KDE/kdebase/workspace/; revision=1130622
2010-05-25 20:28:23 +00:00
Lucas Murray fd47ff5332 Revert r1082246 as it needs to be done in CompositingPrefs::detect()
to work correctly but as doing it there defeats the purpose of moving
the code to begin with there's no point in moving it.
BUG: 226049

svn path=/trunk/KDE/kdebase/workspace/; revision=1088054
2010-02-10 02:53:33 +00:00
Lucas Murray 2a34e440f5 Change the location where LIBGL_ALWAYS_INDIRECT is set and add some
useful documentation about when it is used and why it is required.

svn path=/trunk/KDE/kdebase/workspace/; revision=1082246
2010-01-30 08:27:24 +00:00
Lucas Murray 8960c552d2 Remove OpenGL driver whitelist; Add protection against crashy glXQuery
functions and share the value with the KCM; Fallback to XRender
compositing if OpenGL fails to work correctly; Rearrange setting order
in options.h slightly and fix variable names

svn path=/trunk/KDE/kdebase/workspace/; revision=1079919
2010-01-25 10:02:08 +00:00
Martin Gräßlin 82093ae630 Only load the decoration texture if the decoration pixmap is not null.
This resulted in a crash with Qt 4.6 when accessing the pixmap handle.
BUG: 213507

svn path=/trunk/KDE/kdebase/workspace/; revision=1068519
2010-01-01 11:57:06 +00:00
Jacopo De Simoi abe42cf21f Recreate effectframe textures when compositing is disabled/enabled to avoid corruption
svn path=/trunk/KDE/kdebase/workspace/; revision=1062238
2009-12-14 09:49:06 +00:00
Fredrik Höglund 0b992748be Switch the order, so the decoration is drawn before the client window.
svn path=/trunk/KDE/kdebase/workspace/; revision=1054380
2009-11-25 23:08:19 +00:00
Lucas Murray 8a8428e41c Less Krazy warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1042572
2009-10-30 06:51:59 +00:00
Andreas Kling 0204c2127c Fixed some uses of uninitialized data (SceneOpenGL::selfCheckDone and TimeLine::m_CurveShape)
svn path=/trunk/KDE/kdebase/workspace/; revision=1022613
2009-09-12 09:38:12 +00:00
Robin Harold Burchell f585e4e1d9 A number of small warning fixes (bracketing, etc) to help pick up real problems when working.
svn path=/trunk/KDE/kdebase/workspace/; revision=1022531
2009-09-11 23:44:29 +00:00