Commit graph

7 commits

Author SHA1 Message Date
Martin Gräßlin
a05ad98896 Remove textureWidth/textureHeight from all Shaders
The uniforms textureWidth and textureHeight were only needed for
normal windows. For everything else it was just 1.0/1.0, that is
normalized.

The makeArrays method is changed to produce normalized texcoords
obsoleting the need for these uniforms. So two uniforms less, one
calculation in vertex shaders less and many many lines of code
removed.

At the same time makeArrays is also adjusted to take care of
yInverted of the texture, which is needed as we no longer can use
the enableUnnormalizedTexCoords which did the yInverted transformation.

REVIEW: 101646
2011-06-19 20:54:13 +02:00
Martin Gräßlin
a728823fbe Fix passing matrixes to the shaders
QMatrix4x4 accepts data in row-major order, but returns them in
column-major order, which is not documented and because of that
I expected them to be in row-major order.
This commit fixes it and rewrites the shaders to apply the matrix
multiplications in the right order.
REVIEW: 100759
2011-03-06 09:13:31 +01:00
Fredrik Höglund
5e97ccf7e0 kwin: Normalize the texcoords in the vertex shader 2011-02-10 20:15:23 +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
69044f10c5 GLShader appends the ES specific commands to the shaders 2011-01-30 14:12:01 +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
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