summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/msg/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/joglutils/msg/nodes')
-rw-r--r--src/net/java/joglutils/msg/nodes/Texture2.java2
-rw-r--r--src/net/java/joglutils/msg/nodes/TriangleSet.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/net/java/joglutils/msg/nodes/Texture2.java b/src/net/java/joglutils/msg/nodes/Texture2.java
index 29ed969..c454884 100644
--- a/src/net/java/joglutils/msg/nodes/Texture2.java
+++ b/src/net/java/joglutils/msg/nodes/Texture2.java
@@ -143,7 +143,7 @@ public class Texture2 extends Node {
public void doAction(Action action) {
if (TextureElement.isEnabled(action.getState())) {
- TextureElement.set(action.getState(), getTexture(), getTexEnvMode());
+ TextureElement.set(action.getState(), this);
}
}
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);
}