small fix when setting sampling uniform

This commit is contained in:
codeanticode
2012-08-08 23:23:53 +00:00
parent 7cff2660c4
commit 592b4a0653
2 changed files with 6 additions and 6 deletions

View File

@@ -580,10 +580,10 @@ public class PShader {
PImage img = (PImage)val.value;
Texture tex = pgMain.getTexture(img);
pgl.glUniform1i(loc, texUnit);
if (textures == null) {
if (textures == null) {
textures = new HashMap<Integer, Texture>();
textures.put(texUnit, tex);
}
}
textures.put(texUnit, tex);
texUnit++;
}
}