Initializing the SDK

Initializing Render Controller

Render Controller handles the rendering pipeline - It takes textures from the cameras setup , processes them and renders the final output onto the specified canvas.

/* We query the canvas where the output has to be displayed and pass
along with its webgl context to the Render Controller */
var canvaswgl = document.querySelector("#canvas");
var gl = canvaswgl.getContext("webgl", {preserveDrawingBuffer : true});
var convergenceDistance = 20;
const controller = RenderController;
controller.initialize(canvaswgl, gl, window, convergenceDistance);

Render Controller expects

  1. Canvas where the output has to be rendered

  2. WebGL context of the output canvas

  3. Window object

  4. Convergence distance

This initialization can be done once on launch along with your framework initialization.