LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Itun on April 18, 2011, 01:10:23

Title: glActiveTexture
Post by: Itun on April 18, 2011, 01:10:23
I have problem with this snippet and I suspect that this is glActiveTexture problems. Because in C++ this works normal.
Does somebody have the similar troubles.

           glActiveTexture(GL_TEXTURE0 + index);
           glBindTexture(GL_TEXTURE_2D,
                   ((MaterialSampler2D)diffuse).texture.getTOB());
           shader.setTexture1(index);
           index ++;
           glActiveTexture(GL_TEXTURE0 + index);
           glBindTexture(GL_TEXTURE_2D,
                   ((MaterialSampler2D)specular).texture.getTOB());
           shader.setTexture2( index);
            index ++;
           glActiveTexture(GL_TEXTURE0 + index);
           glBindTexture(GL_TEXTURE_2D,
                   ((MaterialSampler2D)bump).texture.getTOB());
           shader.setTexture3(index);
           index ++;