Constructor
new L3D.ForwardRenderer()
Methods
clearBuffer(camera, renderSettings)
Clear the color and depth buffers based on the camera and render stettings
camera |
Camera | |
renderSettings |
RenderSettings |
disableFrameShaderBlock(shaderBlockName)
Disable a ShaderBlock.
shaderBlockName |
String |
enableCamera(camera, renderSettings, skipViewport)
Sets the camera as the current camera, setting the viewport according to the camera info, updating matrices, etc.
camera |
Camera | |
renderSettings |
RenderSettings | |
skipViewport |
bool |
enableFrameShaderBlock(shaderBlockName, uniforms, textures)
Enable a ShaderBlock only during this frame.
shaderBlockName |
String | |
uniforms |
Object | |
textures |
Array |
getNearLights(instance, result)
Returns a list of all the lights overlapping this instance (it uses sperical bounding so it could returns lights that are not really overlapping)
instance |
* | |
result |
* |
processVisibleData(scene, renderSettings, cameras, lights, instances, skipCollectData)
Collect and process the rendering instances, cameras, and lights that are visible. Called once per frame before iterating cameras. Rendering order is computed here.
scene |
Scene | |
renderSettings |
RenderSettings | |
cameras |
Array | |
lights |
Array | |
instances |
Array | |
skipCollectData |
bool |
render(scene, renderSettings)
Render the scene.
scene |
Scene | |
renderSettings |
RenderSettings |
renderCamera(camera, renderSettings, scene)
Renders the scene from the given camera, using the given render settings.
camera |
* | |
renderSettings |
* | |
scene |
* |
renderFrameCameras(scene, cameras, renderSettings)
Renders the scene from one or more cameras.
scene |
Scene | |
cameras |
Array | |
renderSettings |
RenderSettings |
renderInstances(renderSettings, instances, scene)
Calls the render method for every RenderInstance, taking into account events and frustum culling.
renderSettings |
RenderSettings | |
instances |
Array | |
scene |
Scene |
resetGLState()
Restore the GL state to the default RenderState.
setFullViewport(x, y, w, h)
Set the current full viewport, which could be different from the canvas when rendering to an FBO or the camera has a partial viewport.
x |
* | |
y |
* | |
w |
* | |
h |
* |
updateRenderQueues(camera, instances)
Clears the render queues and adds objects according to their settings.
camera |
* | |
instances |
* |