API Docs for:
Show:

GL.FBO Class

Defined in: ../src/fbo.js:1
Module: GL

FBO for FrameBufferObjects, FBOs are used to store the render inside one or several textures Supports multibuffer and depthbuffer texture, useful for deferred rendering

Constructor

GL.FBO

(
  • color_textures
  • depth_texture
)

Defined in ../src/fbo.js:1

Parameters:

  • color_textures Array

    an array containing the color textures, if not supplied a render buffer will be used

  • depth_texture GL.Texture

    the depth texture, if not supplied a render buffer will be used

Item Index

Methods

bind

(
  • keep_old
)

Defined in ../src/fbo.js:175

Enables this FBO (from now on all the render will be stored in the textures attached to this FBO It stores the previous viewport to restore it afterwards, and changes it to full FBO size

Parameters:

  • keep_old Boolean

    keeps the previous FBO is one was attached to restore it afterwards

setTextures

(
  • color_textures
  • depth_texture
)

Defined in ../src/fbo.js:33

Changes the textures binded to this FBO

Parameters:

  • color_textures Array

    an array containing the color textures, if not supplied a render buffer will be used

  • depth_texture GL.Texture

    the depth texture, if not supplied a render buffer will be used

unbind

()

Defined in ../src/fbo.js:197

Disables this FBO, if it was binded with keep_old then the old FBO is enabled, otherwise it will render to the screen Restores viewport to previous