diff options
Diffstat (limited to 'src/net/java/joglutils/msg/nodes/TextureCoordinate2.java')
-rw-r--r-- | src/net/java/joglutils/msg/nodes/TextureCoordinate2.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/net/java/joglutils/msg/nodes/TextureCoordinate2.java b/src/net/java/joglutils/msg/nodes/TextureCoordinate2.java index ed4ecf8..f7720d2 100644 --- a/src/net/java/joglutils/msg/nodes/TextureCoordinate2.java +++ b/src/net/java/joglutils/msg/nodes/TextureCoordinate2.java @@ -39,6 +39,7 @@ package net.java.joglutils.msg.nodes; import net.java.joglutils.msg.actions.*; import net.java.joglutils.msg.collections.*; +import net.java.joglutils.msg.elements.*; /** Represents a set of 2-dimensional texture coordinates which can be used to texture geometric shapes. */ @@ -46,6 +47,11 @@ import net.java.joglutils.msg.collections.*; public class TextureCoordinate2 extends Node { private Vec2fCollection data; + static { + // Enable the elements this node affects for known actions + GLTextureCoordinateElement.enable(GLRenderAction.getDefaultState()); + } + /** Sets the texture coordinate data in this node. */ public void setData(Vec2fCollection data) { this.data = data; @@ -57,6 +63,8 @@ public class TextureCoordinate2 extends Node { } public void doAction(Action action) { - action.visit(this); + if (TextureCoordinateElement.isEnabled(action.getState())) { + TextureCoordinateElement.set(action.getState(), getData().getData()); + } } } |