Package graphics.renderer
Class LightmapRenderer
java.lang.Object
graphics.renderer.Renderer
graphics.renderer.LightmapRenderer
-
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 renderervoid
protected RenderBatch
createBatch
(int zIndex) Create a new Batch with appropriate parametersprotected Framebuffer
Create a framebufferprotected Shader
Create a shadervoid
init()
Creates the renderer's shader and framebufferprotected 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 uniforms to the shaderMethods inherited from class graphics.renderer.Renderer
clean, fetchColorAttachment, getAvailableBatch, render
-
Constructor Details
-
LightmapRenderer
public LightmapRenderer()
-
-
Method Details
-
init
public void init()Description copied from class:Renderer
Creates the renderer's shader and framebuffer -
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 -
add
Add a gameObject to this renderer -
remove
Remove a gameObject from this renderer -
prepare
protected void prepare()Prepare for rendering. Do anything like setting background here. -
bindLightmap
public void bindLightmap()
-