Class OGLTriggeredNode<GL extends OGLGraphics>

java.lang.Object
com.blackrook.gloop.opengl.node.OGLTriggeredNode<GL>
Type Parameters:
GL - the graphics object to call.
All Implemented Interfaces:
OGLNode<GL>
Direct Known Subclasses:
OGLInitNode

public abstract class OGLTriggeredNode<GL extends OGLGraphics> extends Object implements OGLNode<GL>
A framebuffer node that performs a one-time set of graphics commands. Can be reset so that the one-time function can be performed again.
Author:
Matthew Tropiano
  • Constructor Details

    • OGLTriggeredNode

      public OGLTriggeredNode()
      Creates a new triggered node where the trigger starts set. In other words, this will call the triggered function once, and not again until triggered.
    • OGLTriggeredNode

      public OGLTriggeredNode(boolean triggerFlag)
      Creates a new triggered node where the trigger starts set or unset, according to the programmer.
      Parameters:
      triggerFlag - the initial state of the trigger.
  • Method Details

    • onDisplay

      public final void onDisplay(GL gl)
      Description copied from interface: OGLNode
      Displays this node. The rendering thread for the target window enters this method, so it is safe to call all OGLGraphics functions here.
      Specified by:
      onDisplay in interface OGLNode<GL extends OGLGraphics>
      Parameters:
      gl - the graphics object used for issuing commands to OpenGL.
    • setTrigger

      public void setTrigger()
      Sets the trigger on this node.
    • doTriggeredDisplay

      public abstract void doTriggeredDisplay(GL gl)
      This is the method called by onDisplay(OGLGraphics) for when the triggered method needs to run.
      Parameters:
      gl - the OGLGraphics context.