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
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