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 ++;