Skip to main content

XR8.GlTextureRenderer

Description

Provides a camera pipeline module that draws the camera feed to a canvas as well as extra utilities for GL drawing operations.

Functions

FunctionDescription
configureConfigures the pipeline module that draws the camera feed to the canvas.
createCreates an object for rendering from a texture to a canvas or another texture.
fillTextureViewportConvenience method for getting a Viewport struct that fills a texture or canvas from a source without distortion. This is passed to the render method of the object created by XR8.GlTextureRenderer.create()
getGLctxParametersGets the current set of WebGL bindings so that they can be restored later.
pipelineModuleCreates a pipeline module that draws the camera feed to the canvas.
setGLctxParametersRestores the WebGL bindings that were saved with XR8.GlTextureRenderer.getGLctxParameters().
setTextureProviderSets a provider that passes the texture to draw.
setForegroundTextureProviderSets a provider that passes a list of foreground textures and alpha masks to draw.