Class: Renderer

og.Renderer

new og.Renderer(handler, params)

Represents high level WebGL context interface that starts WebGL handler works real time.
Name Type Description
handler og.webgl.Handler WebGL handler context.
params Object optional Renderer parameters:
Fires:

Members

_pickingCallbacksArray.<og.Renderer~pickingCallback>

Color picking objects rendering queue.

activeCameraog.Camera

Current active camera.

camerasArray.<og.Camera>

Cameras array.

colorObjectsObject

Hash table for drawing objects.

controlsArray.<og.control.Control>

OpenGlobus controls array.

controlsBagObject

Provides exchange between controls.

divobject

Div element with WebGL canvas.
Renderer events. Represents interface for setting events like mousemove, draw, keypress etc.
WebGL handler context.

pickingFramebufferog.webgl.Framebuffer

Picking objects(labels and billboards) framebuffer.
Render nodes store for the comfortable access by the node name.
Whole scene rendering framebuffer.

Methods

addControl(control)

Add the given control to the renderer.
Name Type Description
control og.control.BaseControl Control.

addControls(cArr)

Add the given controls array to the planet node.
Name Type Description
cArr Array.<og.control.BaseControl> Control array.

addPickingCallback(sender, callback)

Adds picking rendering callback function.
Name Type Description
sender object Callback context.
callback og.Renderer~pickingCallback Rendering callback.

addRenderNode(renderNode)

Adds render node to the renderer.
Name Type Description
renderNode og.scene.RenderNode Render node.

addRenderNodes(nodesArr)

Adds render nodes array to the renderer.
Name Type Description
nodesArr Array.<og.scene.RenderNode> Render nodes array.

assignPickingColor(obj)

Assign picking color to the object.
Name Type Description
obj Object Object that pressume to be picked.

clearPickingColor(obj)

Removes picking color from object.
Name Type Description
obj Object Object to remove picking color.
Draw nodes.
Get center of the screen
Returns:
Type Description
og.math.Pixel

getHeight(){number}

Get the client height.
Returns:
Type Description
number

getPickingObject(){Object}

Get an picking object by screen coordinates
Returns:
Type Description
Object Object

getWidth(){number}

Get the client width.
Returns:
Type Description
number
Renderer initialization.

isMultiFramebufferCompatible(){Boolean}

Returns true if 'WEBGL_draw_buffers' extension initialized.
Returns:
Type Description
Boolean

removeControl(control){og.control.BaseControl|undefined}

Remove the given control from the renderer.
Name Type Description
control og.control.BaseControl Control.
Returns:
Type Description
og.control.BaseControl | undefined
Function starts rendering.

Type Definitions

pickingCallback()

This callback renders picking frame.