API Docs for:
Show:

LS.RenderFrameContext Class

This class is used when you want to render the scene not to the screen but to some texture for postprocessing It helps to create the textures and bind them easily, add extra buffers or show it on the screen. Check the FrameFX and CameraFX components to see it in action. Dependencies: LS.Renderer (writes there only)

Constructor

LS.RenderFrameContext

()

Methods

clearTextures

()

Fills the textures with a flat color

disable

()

Called to stop rendering to this context

enable

()

Called to bind the rendering to this context, from now on all the render will be stored in the textures inside

getColorTexture

(
  • index
)
GL.Texture

returns the texture containing the data rendered in this context

Parameters:

  • index Number

    the number of the texture (in case there is more than one)

Returns:

GL.Texture:

the texture

getDepthTexture

() GL.Texture

returns the depth texture containing the depth data rendered in this context (in case the use_depth_texture is set to true)

Returns:

GL.Texture:

the depth texture

show

(
  • use_antialiasing
)

Render the context of the context to the viewport (allows to apply FXAA)

Parameters:

  • use_antialiasing Boolean

    in case you want to render with FXAA antialiasing