This commit is contained in:
codeanticode
2013-05-18 19:45:34 -04:00
parent 26674a7fb9
commit 7c82286fe8
3 changed files with 153 additions and 132 deletions

View File

@@ -4124,13 +4124,7 @@ public class PShapeOpenGL extends PShape {
protected void renderPolys(PGraphicsOpenGL g, PImage textureImage) {
Texture tex = null;
if (textureImage != null) {
tex = g.getTexture(textureImage);
if (tex != null) {
tex.bind();
}
}
Texture tex = textureImage != null ? g.getTexture(textureImage) : null;
boolean renderingFill = false, renderingStroke = false;
BaseShader shader = null;
@@ -4207,10 +4201,6 @@ public class PShapeOpenGL extends PShape {
if (shader != null && shader.bound()) {
shader.unbind();
}
if (tex != null) {
tex.unbind();
}
}