I dont use twgl i wanna pure webgl to set uniforms for "gl.createTexture()".
Source Code:
const depthTexture = gl.createTexture();
...
twgl.setUniforms(programInfo, {
u_projectedTexture: depthTexture
}
Any suggestion ?
I dont use twgl i wanna pure webgl to set uniforms for "gl.createTexture()".
Source Code:
const depthTexture = gl.createTexture();
...
twgl.setUniforms(programInfo, {
u_projectedTexture: depthTexture
}
Any suggestion ?
twgl.setUniforms()
is equivalent to a combo of WebGL functions to bind the texture and set the uniforms. The scheme is:A more extensive example of how to translate
setUniforms()
into native WebGL can be found in the TWGL documentation of setUniforms(). An overview of all WebGL functions, including theuniform
variants, can be found in the official WebGL 2.0 API Quick Reference Guide.