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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a Text object to this rendererprotected RenderBatchcreateBatch(int zIndex) Create a new Batch with appropriate parametersprotected FramebufferCreate a framebufferprotected ShaderCreate a shaderstatic intprotected voidprepare()Prepare for rendering.protected voidrebuffer()Rebuffer all the data into batchesvoidvoidrender()Loop through all render batches and render themprotected voiduploadUniforms(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:
createShaderin classRenderer- Returns:
- the created shader
-
createFramebuffer
Create a framebuffer- Specified by:
createFramebufferin classRenderer- Returns:
- the created Framebuffer
-
createBatch
Create a new Batch with appropriate parameters- Specified by:
createBatchin classRenderer- Parameters:
zIndex-- Returns:
- a new batch
-
uploadUniforms
Upload uniforms to the shader- Specified by:
uploadUniformsin classRenderer- Parameters:
shader- the shader
-
rebuffer
protected void rebuffer()Rebuffer all the data into batches -
render
public void render()Description copied from class:RendererLoop through all render batches and render them -
prepare
protected void prepare()Description copied from class:RendererPrepare 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
-