API Docs for:
Show:

GL.FBO Class

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

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
  • stencil
)

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

  • stencil Bool

    create a stencil buffer?

Item Index

Methods

bind

(
  • keep_old
)

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

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
  • skip_disable
)

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

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

  • skip_disable Boolean

    it doenst try to go back to the previous FBO enabled in case there was one

unbind

()

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

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

update

(
  • skip_disable
)

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

Updates the FBO with the new set of textures and buffers

Parameters:

  • skip_disable Boolean

    it doenst try to go back to the previous FBO enabled in case there was one