Package graphics.renderer
Class DebugRenderer
java.lang.Object
graphics.renderer.Renderer
graphics.renderer.DebugRenderer
Azurite
Used to render debug materials, like collision hitboxes, raycasts, or test data in general. Only supports rendering lines.-
Field Summary
Fields inherited from class graphics.renderer.Renderer
batches, framebuffer, noRebuffer, textureSlots
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(GameObject gameObject) Add a gameObject to this rendererprotected RenderBatch
createBatch
(int zIndex) Create a new Batch with appropriate parametersprotected Framebuffer
Create a framebufferprotected Shader
Create a shaderprotected void
prepare()
Prepare for rendering.protected void
rebuffer()
Rebuffer all the data into batchesvoid
remove
(GameObject gameObject) Remove a gameObject from this rendererprotected void
uploadUniforms
(Shader shader) Upload the required uniformsMethods inherited from class graphics.renderer.Renderer
clean, fetchColorAttachment, getAvailableBatch, init, render
-
Constructor Details
-
DebugRenderer
public DebugRenderer()
-
-
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 fbo
-
createBatch
Create a new Batch with appropriate parameters- Specified by:
createBatch
in classRenderer
- Returns:
- a new batch
-
uploadUniforms
Upload the required uniforms- Specified by:
uploadUniforms
in classRenderer
- Parameters:
shader
- the shader
-
rebuffer
protected void rebuffer()Rebuffer all the data into batches -
prepare
protected void prepare()Prepare for rendering. Do anything like setting background here. -
add
Add a gameObject to this renderer -
remove
Remove a gameObject from this renderer
-