summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/msg/nodes/TriangleSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/joglutils/msg/nodes/TriangleSet.java')
-rw-r--r--src/net/java/joglutils/msg/nodes/TriangleSet.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/java/joglutils/msg/nodes/TriangleSet.java b/src/net/java/joglutils/msg/nodes/TriangleSet.java
index 8f708cb..d7c55bb 100644
--- a/src/net/java/joglutils/msg/nodes/TriangleSet.java
+++ b/src/net/java/joglutils/msg/nodes/TriangleSet.java
@@ -80,7 +80,10 @@ public class TriangleSet extends TriangleBasedShape {
if (GLTextureElement.isEnabled(state) &&
GLTextureCoordinateElement.isEnabled(state)) {
- tex = GLTextureElement.get(state);
+ Texture2 texNode = GLTextureElement.get(state);
+ if (texNode != null) {
+ tex = texNode.getTexture();
+ }
haveTexCoords = (GLTextureCoordinateElement.get(state) != null);
}