Remove the remaining bits of deprecated GL usage
The drawing is now completely shader based, which makes away with all usage of the depracted matrix stack. This also allows us to do things like simple translations and texture coordinate translation directly instead of doing everything indirectly through matrices. Fixed vertex attributes ('vertexPointer()' etc) are also replaced with user defined attribute arrays.
This commit is contained in:
parent
88c1489554
commit
9e63fb6b64
29 changed files with 701 additions and 295 deletions
18
shader/simple.vert
Normal file
18
shader/simple.vert
Normal file
|
@ -0,0 +1,18 @@
|
|||
|
||||
uniform mat4 projMat;
|
||||
|
||||
uniform vec2 texSizeInv;
|
||||
uniform float texOffsetX;
|
||||
uniform vec2 translation;
|
||||
|
||||
attribute vec2 position;
|
||||
attribute vec2 texCoord;
|
||||
|
||||
varying vec2 v_texCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projMat * vec4(position + translation, 0, 1);
|
||||
|
||||
v_texCoord = vec2(texCoord.x + texOffsetX, texCoord.y) * texSizeInv;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue