net.java.joglutils.msg.actions
Class GLResetAction

java.lang.Object
  extended by net.java.joglutils.msg.actions.Action
      extended by net.java.joglutils.msg.actions.GLResetAction

public class GLResetAction
extends Action

An action which resets the OpenGL state of notes holding on to server-side OpenGL objects. This is needed to clear out for example Texture2 nodes if the OpenGL context being used to render them was destroyed and re-created.


Constructor Summary
GLResetAction()
           
 
Method Summary
static void addActionMethod(Class<? extends Node> nodeType, Method m)
          Adds an action method for the given node type to this action.
 void apply(Node node)
          Applies this Action to a particular node.
static State getDefaultState()
          Returns the default state all instances of this class are initialized with.
 State getState()
          Returns the global state this action encompasses, which is altered by the nodes the action traverses.
static void resetGL(GLResetAction action, Texture2 node)
          Action method which dispatches to per-node rendering functionality.
 
Methods inherited from class net.java.joglutils.msg.actions.Action
apply, getPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLResetAction

public GLResetAction()
Method Detail

getDefaultState

public static State getDefaultState()
Returns the default state all instances of this class are initialized with.


addActionMethod

public static void addActionMethod(Class<? extends Node> nodeType,
                                   Method m)
Adds an action method for the given node type to this action. This should only be called by developers adding new node types and not desiring to use the standard overriding mechanisms.


getState

public State getState()
Description copied from class: Action
Returns the global state this action encompasses, which is altered by the nodes the action traverses.

Specified by:
getState in class Action

apply

public void apply(Node node)
Description copied from class: Action
Applies this Action to a particular node. This is how operations such as rendering are initiated.

Specified by:
apply in class Action

resetGL

public static void resetGL(GLResetAction action,
                           Texture2 node)
Action method which dispatches to per-node rendering functionality.