Fix issue 1166

This commit is contained in:
codeanticode
2012-08-07 21:49:32 +00:00
parent 4bf692c0c8
commit fa1dcabf69
5 changed files with 92 additions and 63 deletions

View File

@@ -287,6 +287,11 @@ public class Texture implements PConstants {
return;
}
if (pixels.length == 0) {
// Nothing to do (means that w == h == 0) but not an erroneous situation
return;
}
boolean enabledTex = false;
if (!pgl.texturingIsEnabled(glTarget)) {
pgl.enableTexturing(glTarget);