Texture.bind()/unbind() call the gl functions irrespective of the value of the bound flag

This commit is contained in:
codeanticode
2012-07-25 17:12:59 +00:00
parent 7ffc0c29bf
commit 87d07557dd
3 changed files with 8 additions and 11 deletions

View File

@@ -556,20 +556,16 @@ public class Texture implements PConstants {
public void bind() {
if (!bound) {
pgl.enableTexturing(glTarget);
pgl.glBindTexture(glTarget, glName);
bound = true;
}
pgl.enableTexturing(glTarget);
pgl.glBindTexture(glTarget, glName);
bound = true;
}
public void unbind() {
if (bound) {
pgl.enableTexturing(glTarget);
pgl.glBindTexture(glTarget, 0);
bound = false;
}
pgl.enableTexturing(glTarget);
pgl.glBindTexture(glTarget, 0);
bound = false;
}