0
$\begingroup$

I would like to programmatically allow the user to add new textures to get passed via webgl to a shader. To do this, I need a function from n to gl.TEXTUREn. It appears that gl.TEXTUREn = gl.TEXTURE0 + n, both from my own debug testing and the answer to: https://stackoverflow.com/questions/43066304/webgl2-explanation-for-gl-texture0-n

But is there anywhere this is guaranteed to be the case, regardless of setup?

$\endgroup$
1
  • $\begingroup$ Isn't that what the answer to the question you cited says? I mean, what answer other than that are you looking for? $\endgroup$ Sep 2, 2022 at 23:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.