MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / _initBuffers

Method _initBuffers

src/tools/texture-lab/renderer.js:81–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 }
80
81 _initBuffers() {
82 const gl = this.gl;
83
84 this.quadBuffer = gl.createBuffer();
85 gl.bindBuffer(gl.ARRAY_BUFFER, this.quadBuffer);
86 gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]), gl.STATIC_DRAW);
87
88 this.texCoordBuffer = gl.createBuffer();
89 gl.bindBuffer(gl.ARRAY_BUFFER, this.texCoordBuffer);
90 gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]), gl.STATIC_DRAW);
91 }
92
93 _compileShader(source, type) {
94 const gl = this.gl;

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected