Package graphics.renderer
Class TextRenderer
java.lang.Object
graphics.renderer.Renderer
graphics.renderer.TextRenderer
- Author:
- Asher Haun
-
Field Summary
Fields inherited from class graphics.renderer.Renderer
batches, framebuffer, noRebuffer, textureSlots
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a Text object to this rendererprotected RenderBatch
createBatch
(int zIndex) Create a new Batch with appropriate parametersprotected Framebuffer
Create a framebufferprotected Shader
Create a shaderstatic int
protected void
prepare()
Prepare for rendering.protected void
rebuffer()
Rebuffer all the data into batchesvoid
void
render()
Loop through all render batches and render themprotected void
uploadUniforms
(Shader shader) Upload uniforms to the shaderMethods inherited from class graphics.renderer.Renderer
add, clean, fetchColorAttachment, getAvailableBatch, init, remove
-
Constructor Details
-
TextRenderer
public TextRenderer()
-
-
Method Details
-
createShader
Create a shader- Specified by:
createShader
in classRenderer
- Returns:
- the created shader
-
createFramebuffer
Create a framebuffer- Specified by:
createFramebuffer
in classRenderer
- Returns:
- the created Framebuffer
-
createBatch
Create a new Batch with appropriate parameters- Specified by:
createBatch
in classRenderer
- Parameters:
zIndex
-- Returns:
- a new batch
-
uploadUniforms
Upload uniforms to the shader- Specified by:
uploadUniforms
in classRenderer
- Parameters:
shader
- the shader
-
rebuffer
protected void rebuffer()Rebuffer all the data into batches -
render
public void render()Description copied from class:Renderer
Loop through all render batches and render them -
prepare
protected void prepare()Description copied from class:Renderer
Prepare for rendering. Do anything like setting background here. -
add
Add a Text object to this renderer- Parameters:
textObject
- the Text with renderable glyphs
-
getMaxBatchSize
public static int getMaxBatchSize() -
remove
-