establecer la textura para por glUniform1i
Tengo una pregunta sobre cómo establecer la textura por glUniform1i
. He visto código como el siguiente.
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, texture0);
glUniform1i(_textureUniform, 0);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, texture1);
glUniform1i(_textureUniform, 1);
¿Significa, si uso el número i
en el glUniform1i
, entonces tengo que usar glActiveTexture(GL_TEXTURE **i** )
?
49
1 answers
Sí, tienes razón. El valor uniforme de un muestreador se refiere a la unidad de textura, no al id de textura.
46
Author: Tim,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-03-12 05:16:28
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-03-12 05:16:28