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 ?
Copyright © 2021 Jogjafile Inc.
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 theuniformvariants, can be found in the official WebGL 2.0 API Quick Reference Guide.