Commit graph

550 commits

Author SHA1 Message Date
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
Martin Gräßlin
e87e2b43a2 Use OpenGL ES 2 for mobile 2011-01-30 14:11:55 +01:00
Martin Gräßlin
aefb076a7b OpenGL ES does not support Quads 2011-01-30 14:11:55 +01:00
Martin Gräßlin
faa86c2464 We do not need to resolve extensions in OpenGL ES.
Therefore the kwinglutils_funcs.h includes just GLES/gl.h and
the .cpp does not do anything
2011-01-30 14:11:55 +01:00
Martin Gräßlin
8f2f126c31 CMake check to find OpenGLES 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
Martin Gräßlin
f6600709de Fix QLatin1String/QString Krazy issues
SVN_SILENT

svn path=/trunk/KDE/kdebase/workspace/; revision=1210598
2011-01-01 09:50:05 +00:00
André Wöbbeking
ea80dd8867 -pedantic
svn path=/trunk/KDE/kdebase/workspace/; revision=1205832
2010-12-12 18:22:09 +00:00
Pavel Heimlich
8ef7cec838 Add missing include. Sun Studio wasn't able to find it by itself.
svn path=/trunk/KDE/kdebase/workspace/; revision=1203608
2010-12-04 21:10:49 +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
Fredrik Höglund
95b3e7b419 Add detection for GeForce GPUs with the NVIDIA driver.
svn path=/trunk/KDE/kdebase/workspace/; revision=1203427
2010-12-03 23:26:30 +00:00
Fredrik Höglund
3350824e4d Add detection for Palm.
svn path=/trunk/KDE/kdebase/workspace/; revision=1203407
2010-12-03 21:23:03 +00:00
Fredrik Höglund
f5a25b4ebb Don't query GL_SHADING_LANGUAGE_VERSION when GLSL isn't supported.
svn path=/trunk/KDE/kdebase/workspace/; revision=1201788
2010-11-28 17:16:45 +00:00
Fredrik Höglund
74101f90f7 Add a function for printing the results of the detection code.
svn path=/trunk/KDE/kdebase/workspace/; revision=1201780
2010-11-28 17:07:23 +00:00
Fredrik Höglund
bdd0273411 Add detection of limited texture NPOT support.
svn path=/trunk/KDE/kdebase/workspace/; revision=1198553
2010-11-18 21:47:29 +00:00
Fredrik Höglund
6118a5b983 Add the new and improved OpenGL platform detection code.
svn path=/trunk/KDE/kdebase/workspace/; revision=1195845
2010-11-12 05:30:38 +00:00
Thomas Lübking
68fbd31ad8 add windowgeometry tip effect, bind it to the general setting and generalize effect feature provide api, thus update resize effect
BUG: 219755

svn path=/trunk/KDE/kdebase/workspace/; revision=1195300
2010-11-10 19:21:56 +00:00
Martin Gräßlin
6353d6ff57 Don't blur behind opaque window decorations.
Adding a new AbilityUsesBlurBehind which can be set by decorations with
alpha channel to request that the background can be blurred. This improves
the situation for our completely opaque default Oxygen decoration.

This change is a behavior change in comparison to 4.5! Translucent decorations do
not get blurred by default any more.
CCMAIL: craig.p.drummond@googlemail.com

svn path=/trunk/KDE/kdebase/workspace/; revision=1195274
2010-11-10 18:33:07 +00:00
Kevin Ottens
dcded20d84 Cleanup KLibLoader use.
svn path=/trunk/KDE/kdebase/workspace/; revision=1195243
2010-11-10 16:42:52 +00:00