function FBO( textures, depth_texture, stencil, gl )
{
	gl = gl || global.gl;
	this.gl = gl;
	this._context_id = gl.context_id; 

	if(textures && textures.constructor !== Array)
		throw("FBO textures must be an Array");

	this.handler = null;
	this.width = -1;
	this.height = -1;
	this.color_textures = [];
	this.depth_texture = null;
	this.stencil = !!stencil;

	this._stencil_enabled = false;
	this._num_binded_textures = 0;
	this.order = null;

	//assign textures
	if((textures && textures.length) || depth_texture)
		this.setTextures( textures, depth_texture );

	//save state
	this._old_fbo_handler = null;
	this._old_viewport = new Float32Array(4);
}
FBO for FrameBufferObjects, FBOs are used to store the render inside one or several textures 
Supports multibuffer and depthbuffer texture, useful for deferred rendering
@namespace GL
@class FBO
@param {Array} color_textures an array containing the color textures, if not supplied a render buffer will be used
@param {GL.Texture} depth_texture the depth texture, if not supplied a render buffer will be used
@param {Bool} stencil create a stencil buffer?
@constructor