ZBuffer Class
Module: utils
ZBufferCube class
Constructor
ZBuffer
()
Methods
bind
()
Bind framebuffer before drawing
bind
()
Bind framebuffer before drawing
bindCube
(
-
cubeFace
Bind cube framebuffer before drawing
Parameters:
-
cubeFace
ObjectFace of the cube ENUM
draw
(
-
drawFunction(uniforms)
Draw Scene into framebuffer cube texture
Parameters:
-
drawFunction(uniforms)
ObjectdrawFunction to pass uniforms to
Example:
var cube = new ZBufferCube()
cube.draw(function(uniforms){
world.draw();
})
var cube = new ZBufferCube()
var shaderOverride = basicShader({color:[1.0,0.0,0.0]})
cube.draw(function(uniforms){
world.drawOverride(shaderOverride,uniforms);
})
unbind
()
Unbind framebuffer
unbind
()
Unbind framebuffer