Skip to main content

XR8.GlTextureRenderer.setGLctxParameters()

XR8.GlTextureRenderer.setGLctxParameters(GLctx, restoreParams)

Description​

Restores the WebGL bindings that were saved with XR8.GlTextureRenderer.getGLctxParameters().

Parameters​

ParameterTypeDescription
GLctxWebGlRenderingContext or WebGl2RenderingContextThe WebGLRenderingContext or WebGL2RenderingContext to restore bindings on.
restoreParamsThe output of XR8.GlTextureRenderer.getGLctxParameters().

Returns​

None

Example​

const restoreParams = XR8.GlTextureRenderer.getGLctxParameters(GLctx, [GLctx.TEXTURE0])
// Alter context parameters as needed
...
XR8.GlTextureRenderer.setGLctxParameters(GLctx, restoreParams)
// Context parameters are restored to their previous state