public void bind ( ) { program . use ( ) ; if ( textures != null ) { final TIntObjectIterator < Texture > iterator = textures . iterator ( ) ; while ( iterator . hasNext ( ) ) { iterator . advance ( ) ; // Bind the texture to the unit final int unit = iterator . key ( ) ; iterator . value ( ) . bind ( unit ) ; // Bind the shader sampler uniform to the unit program . bindSampler ( unit ) ; } } }
Binds the material to the OpenGL context .