Commit graph

568 commits

Author SHA1 Message Date
Fredrik Höglund
ee406e6d86 Tweak the debug output to make it more readable.
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213845
2011-01-30 15:07:40 +01:00
Fredrik Höglund
7d5d8213dd Don't print the GLSL version when GLSL isn't supported.
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213843
2011-01-30 15:07:40 +01:00
Fredrik Höglund
1643fdfc63 Add some missing radeon GPU's
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213842
2011-01-30 15:07:40 +01:00
Fredrik Höglund
83fd472bb3 Fix chipset detection with r300g
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213841
2011-01-30 15:07:02 +01:00
Martin Gräßlin
cf94a0e8f8 Binding shaders moved explicitly to ShaderManager. 2011-01-30 14:24:49 +01:00
Martin Gräßlin
19f6b9667b Remove ShaderEffect from KWinEffects Library.
The class is not used by any effect any more and the
design of the ShaderEffect makes it hardly usable.
For most effects just rendering the windows with the Shader
attached to it makes more sense than rendering the complete
screen into a FBO and apply the shader on the off-screen texture.
2011-01-30 14:20:05 +01:00
Martin Gräßlin
36daa74589 Combine custom vertex with built-in fragment shader. 2011-01-30 14:12:06 +01:00
Martin Gräßlin
a478fc7ff3 Allow creating shaders from code directly. 2011-01-30 14:12:05 +01:00
Martin Gräßlin
f78d838fc7 Better support custom shaders. 2011-01-30 14:12:05 +01:00
Martin Gräßlin
61615ea7ff Need to copy QPixmap to QImage in GLES.
The Image extension seems to need the pixmap around and that's something
we cannot guarantee in the generic case.
2011-01-30 14:12:05 +01:00
Martin Gräßlin
d683ce560c Adding new uniform to enforce that alpha becomes 1.0
When rendering opaque (RGB-only) windows the alpha ends up to be 0
with blending disabled. This breaks subsequent rendering steps which
require blenden (e.g. Lanczos). Therefore a uniform is used to ensure
that the alpha channel is set to 1.
2011-01-30 14:12:04 +01:00
Martin Gräßlin
6252421a70 Disable clipping when rendering infiniteRegion 2011-01-30 14:12:04 +01:00
Martin Gräßlin
efb82daf30 Adding high-level method for glLoadMatrix 2011-01-30 14:12:03 +01:00
Martin Gräßlin
e49345872c Add high-level functions for <push|pop|mult>Matrix.
All methods are no-ops for GLES which allows to use them from
effects without checks for GLES.
2011-01-30 14:12:03 +01:00
Martin Gräßlin
460ca2729a Make KWin-GLES branch compile with desktop GL 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
4e36027924 Drop unused bindAttribute Location function. 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
a4e4752109 Combine built-in vertex with custom fragment shader
ShaderManager supports a new concept to load just a fragment shader from file
and use a built-in shader for the vertex shader. This allows an effect to use
a custom fragment shader.
2011-01-30 14:12:02 +01:00
Martin Gräßlin
1ba818044f Read a matrix uniform back from shader.
Might require additions to kwinglutils_func in desktop profile
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
5c6e32eaed GLPlatform compiles on EGL 2011-01-30 14:12:01 +01:00
Martin Gräßlin
69044f10c5 GLShader appends the ES specific commands to the shaders 2011-01-30 14:12:01 +01:00
Martin Gräßlin
45f42cdea9 Adding a shared VBO for streaming data. 2011-01-30 14:12:00 +01:00
Martin Gräßlin
a352a0e6a8 Remove implemented TODO marker 2011-01-30 14:12:00 +01:00
Martin Gräßlin
910ba17444 VBO uses ShaderManager to get current bound shader 2011-01-30 14:12:00 +01:00
Martin Gräßlin
753df55973 Set Color as a uniform 2011-01-30 14:12:00 +01:00
Martin Gräßlin
3c6e7309f2 New ShaderManager
The ShaderManager provides the built-in shaders for scene and effects.
Scene and effects can simply push one of those built-in shaders or a
custom one on a stack ensuring that the previously bound shader will be
rebound when the shader is poped again.

The class will be extended to not only have built-in shaders but also to
load custom shaders and being the only way to bind a shader at all.
2011-01-30 14:11:59 +01:00
Martin Gräßlin
a182744648 Fix color rendering 2011-01-30 14:11:59 +01:00
Martin Gräßlin
9bbb852f0c Resolve EGL and GLES function pointers 2011-01-30 14:11:59 +01:00
Martin Gräßlin
70fefbbbae Adding an initEGL method and check for required extension 2011-01-30 14:11:59 +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
d31c00ed0e Better CMake detection for building ES or desktop 2011-01-30 14:11:58 +01:00
Martin Gräßlin
a2e214d326 Enable PaintClipper on core VBO again.
Need to disable clearing screen on EGL for that.
With Mesa swapping buffer is sufficient, though a better solution will be required for other drivers
2011-01-30 14:11:57 +01:00
Martin Gräßlin
f240fc2196 Support QMatrix4x4 as Uniform value 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
f5dbeb8fab More ifdefing for ES 2011-01-30 14:11:57 +01:00
Martin Gräßlin
8d7a861928 Fix build system for ES 2011-01-30 14:11:57 +01:00
Martin Gräßlin
dfde66b4a9 Fix compile error in desktop modus 2011-01-30 14:11:56 +01:00
Martin Gräßlin
e25f43ceb0 Attribute stack not available in ES 2011-01-30 14:11:56 +01:00
Martin Gräßlin
70e167aca7 GLPlatform not available in OpenGL ES
Should be replaced by a short implementation
2011-01-30 14:11:56 +01:00
Martin Gräßlin
2db7538891 ShaderEffect not available in OpenGL ES.
Deprecate the ShaderEffect, will probably be dropped in 4.7
2011-01-30 14:11:56 +01:00
Martin Gräßlin
2cf5f79880 Remove some more unsupported functions 2011-01-30 14:11:56 +01:00
Martin Gräßlin
fd8dfa2084 OpenGL ES always supports VBO 2011-01-30 14:11:56 +01:00
Martin Gräßlin
e5640dc655 ES does not support Vertex array - only use core painting 2011-01-30 14:11:56 +01:00
Martin Gräßlin
b13f3f5f11 In ES it's GL_FRAMEBUFFER instead of GL_FRAMEBUFFER_EXT
I hope this does not break in desktop mode.
2011-01-30 14:11:55 +01:00
Martin Gräßlin
90eb1ed1a0 No GL_TEXTURE_RECTANGLE_ARB in ES 2011-01-30 14:11:55 +01:00
Martin Gräßlin
d7321dae71 ES does not support GL_RGBA8 and GL_BGRA for textures 2011-01-30 14:11:55 +01:00
Martin Gräßlin
d4e75aa1da RenderGLGeometry and texture coord normalization are noops in ES 2011-01-30 14:11:55 +01:00