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 Summary
ConstructorsConstructorDescriptionCreates a new triggered node where the trigger starts set.OGLTriggeredNode(boolean triggerFlag) Creates a new triggered node where the trigger starts set or unset, according to the programmer. -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddoTriggeredDisplay(GL gl) This is the method called byonDisplay(OGLGraphics)for when the triggered method needs to run.final voidDisplays this node.voidSets the trigger on this node.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OGLNode
getPolygonsRendered, getRenderTimeNanos, onFramebufferResize
-
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
Description copied from interface:OGLNodeDisplays this node. The rendering thread for the target window enters this method, so it is safe to call allOGLGraphicsfunctions here.- Specified by:
onDisplayin interfaceOGLNode<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
This is the method called byonDisplay(OGLGraphics)for when the triggered method needs to run.- Parameters:
gl- the OGLGraphics context.
-