MCPcopy Create free account
hub / github.com/gpujs/gpu.js / defineTexture

Method defineTexture

src/backend/web-gl/kernel-value/array.js:37–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 defineTexture() {
38 const { context: gl } = this;
39 gl.activeTexture(this.contextHandle);
40 gl.bindTexture(gl.TEXTURE_2D, this.texture);
41 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
42 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
43 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
44 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
45 }
46
47 setupTexture() {
48 this.contextHandle = this.onRequestContextHandle();

Callers 1

setupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected