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
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
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
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
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