Skip to content

Commit fe0ac5e

Browse files
Merge pull request #159 from JingyuanZhang/master
chore(webgl): update vertex buffer data & del useless point and stride
2 parents da01409 + df9b225 commit fe0ac5e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/paddlejs-backend-webgl/src/ops/vShader.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ const vShaderSource = [
3030
`];
3131

3232
const vShaderData = new Float32Array([
33-
-1.0, 1.0, 0.0, 1.0,
34-
-1.0, -1.0, 0.0, 0.0,
35-
1.0, 1.0, 1.0, 1.0,
36-
1.0, -1.0, 1.0, 0.0
33+
-1.0, 1.0,
34+
-1.0, -1.0,
35+
1.0, 1.0,
36+
1.0, -1.0
3737
]);
3838

3939
export { vShaderSource, vShaderData };

packages/paddlejs-backend-webgl/src/webgl/WebGLProgram.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ export default class GLProgram {
6666
gl.enableVertexAttribArray(aPosition);
6767
// Bind the position buffer.
6868
gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
69-
gl.vertexAttribPointer(aPosition, 2, gl.FLOAT, false, 16, 0);
69+
gl.vertexAttribPointer(aPosition, 2, gl.FLOAT, false, 0, 0);
7070
}
7171
}

0 commit comments

Comments
 (0)