GL.FBO Class
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
Parameters:
-
color_textures
Arrayan array containing the color textures, if not supplied a render buffer will be used
-
depth_texture
GL.Texturethe depth texture, if not supplied a render buffer will be used
-
stencil
Boolcreate a stencil buffer?
Item Index
Methods
Methods
bind
-
keep_old
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
Booleankeeps the previous FBO is one was attached to restore it afterwards
setTextures
-
color_textures
-
depth_texture
-
skip_disable
Changes the textures binded to this FBO
Parameters:
-
color_textures
Arrayan array containing the color textures, if not supplied a render buffer will be used
-
depth_texture
GL.Texturethe depth texture, if not supplied a render buffer will be used
-
skip_disable
Booleanit doenst try to go back to the previous FBO enabled in case there was one
unbind
()
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
Updates the FBO with the new set of textures and buffers
Parameters:
-
skip_disable
Booleanit doenst try to go back to the previous FBO enabled in case there was one