I only use the matrix to draw a square! Only the matrix is updated in each rendering. How to remove Vertex Position from my codes
lock like this https://webgl2fundamentals.org/webgl/lessons/webgl-drawing-without-data.html
#version 300 es
in vec4 a_position;
in vec2 a_texcoord;
uniform mat4 u_matrix;
out vec2 v_texcoord;
void main()
ngl_Position = u_matrix * a_position;
v_texcoord = a_texcoord;
}
and remove this
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
0, 0, 0,
0, 1, 0,
1, 0, 0,
0, 1, 0,
1, 1, 0,
1, 0, 0]), gl.STATIC_DRAW);
Sorry for using Google Translator