Use explicit shader attributes.

This commit is contained in:
Paul Chote
2015-12-19 23:57:52 +00:00
parent 788def1c31
commit be29ec5342
11 changed files with 64 additions and 38 deletions

View File

@@ -1,9 +1,13 @@
uniform vec2 Scroll;
uniform vec2 r1, r2;
attribute vec4 aVertexPosition;
attribute vec4 aVertexTexCoord;
varying vec4 vTexCoord;
void main()
{
vec2 p = (gl_Vertex.xy - Scroll.xy)*r1 + r2;
vec2 p = (aVertexPosition.xy - Scroll.xy)*r1 + r2;
gl_Position = vec4(p.x,p.y,0,1);
gl_TexCoord[0] = gl_MultiTexCoord0;
vTexCoord = aVertexTexCoord;
}