diff options
Diffstat (limited to 'src/net/java/joglutils/msg/nodes/Separator.java')
-rw-r--r-- | src/net/java/joglutils/msg/nodes/Separator.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/net/java/joglutils/msg/nodes/Separator.java b/src/net/java/joglutils/msg/nodes/Separator.java index c60ba45..fdebece 100644 --- a/src/net/java/joglutils/msg/nodes/Separator.java +++ b/src/net/java/joglutils/msg/nodes/Separator.java @@ -38,6 +38,7 @@ package net.java.joglutils.msg.nodes; import net.java.joglutils.msg.actions.*; +import net.java.joglutils.msg.misc.*; /** Represents a push / pop of OpenGL state, "separating" the sub-graph below this separator from the nodes which follow it in @@ -45,8 +46,12 @@ import net.java.joglutils.msg.actions.*; public class Separator extends Group { public void doAction(Action action) { - action.visitPre(this); - super.doAction(action); - action.visitPost(this); + State state = action.getState(); + state.push(); + try { + super.doAction(action); + } finally { + state.pop(); + } } } |