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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(GameObject gameObject) Add a gameObject to this renderervoidprotected RenderBatchcreateBatch(int zIndex) Create a new Batch with appropriate parametersprotected FramebufferCreate a framebufferprotected ShaderCreate a shadervoidinit()Creates the renderer's shader and framebufferprotected voidprepare()Prepare for rendering.protected voidrebuffer()Rebuffer all the data into batchesvoidremove(GameObject gameObject) Remove a gameObject from this rendererprotected voiduploadUniforms(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:RendererCreates the renderer's shader and framebuffer -
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 -
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()
-