Interface QuadPipeline
-
- All Known Implementing Classes:
QuadPipelineGL10,QuadPipelineGL11,QuadPipelineGL15,QuadPipelineGL30
public interface QuadPipelineUtility for drawing a stream of quads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceQuadPipeline.EventListenerObserver of aQuadPipeline.static classQuadPipeline.EventTypeKind of event.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(QuadPipeline.EventListener listener)Registers anQuadPipeline.EventListenerwith thisQuadPipeline.voidaddQuad(com.jogamp.opengl.GL gl, Quad quad)Adds a quad to thisQuadPipeline.voidbeginRendering(com.jogamp.opengl.GL gl)Starts a render cycle with thisQuadPipeline.voiddispose(com.jogamp.opengl.GL gl)Frees resources used by thisQuadPipeline.voidendRendering(com.jogamp.opengl.GL gl)Finishes a render cycle with thisQuadPipeline.voidflush(com.jogamp.opengl.GL gl)Draws all vertices in thisQuadPipeline.intgetSize()Returns number of quads in thisQuadPipeline.booleanisEmpty()Checks if there aren't any quads in thisQuadPipeline.voidremoveListener(QuadPipeline.EventListener listener)Deregisters anQuadPipeline.EventListenerfrom thisQuadPipeline.
-
-
-
Method Detail
-
addListener
void addListener(QuadPipeline.EventListener listener)
Registers anQuadPipeline.EventListenerwith thisQuadPipeline.- Parameters:
listener- Listener to register- Throws:
NullPointerException- if listener is null
-
addQuad
void addQuad(com.jogamp.opengl.GL gl, Quad quad)Adds a quad to thisQuadPipeline.- Parameters:
gl- Current OpenGL contextquad- Quad to add to pipeline- Throws:
NullPointerException- if context or quad is nullcom.jogamp.opengl.GLException- if context is unexpected version
-
beginRendering
void beginRendering(com.jogamp.opengl.GL gl)
Starts a render cycle with thisQuadPipeline.- Parameters:
gl- Current OpenGL context- Throws:
NullPointerException- if context is nullcom.jogamp.opengl.GLException- if context is unexpected version
-
dispose
void dispose(com.jogamp.opengl.GL gl)
Frees resources used by thisQuadPipeline.- Parameters:
gl- Current OpenGL context- Throws:
NullPointerException- if context is nullcom.jogamp.opengl.GLException- if context is unexpected version
-
endRendering
void endRendering(com.jogamp.opengl.GL gl)
Finishes a render cycle with thisQuadPipeline.- Parameters:
gl- Current OpenGL context- Throws:
NullPointerException- if context is nullcom.jogamp.opengl.GLException- if context is unexpected version
-
flush
void flush(com.jogamp.opengl.GL gl)
Draws all vertices in thisQuadPipeline.- Parameters:
gl- Current OpenGL context- Throws:
NullPointerException- if context is nullcom.jogamp.opengl.GLException- if context is unexpected version
-
getSize
int getSize()
Returns number of quads in thisQuadPipeline.- Returns:
- Number of quads in this pipeline, not negative
-
isEmpty
boolean isEmpty()
Checks if there aren't any quads in thisQuadPipeline.- Returns:
- True if there aren't any quads in this pipeline
-
removeListener
void removeListener(QuadPipeline.EventListener listener)
Deregisters anQuadPipeline.EventListenerfrom thisQuadPipeline.- Parameters:
listener- Listener to deregister, ignored if null or unregistered
-
-