WebGLFramebuffer 在webgl-framebuffer.ts
成员函数
_gpuFramebuffer: IWebGLGPUFramebuffer
IWebGLGPUFramebuffer结构
export interface IWebGLGPUFramebuffer { gpuRenderPass: IWebGLGPURenderPass; gpuColorTextures: IWebGLGPUTexture[]; //绑定到framebuff图片纹理,如果纹理不存在实际的纹理,则是RENDERBUFFER屏幕缓存(gl.RENDERBUFFER)** gpuDepthStencilTexture: IWebGLGPUTexture | null; //绑定到framebuff深度或者Stencil纹理 glFramebuffer: WebGLFramebuffer | null; isOffscreen: boolean; width: number; height: number; }
initialize (info: FramebufferInfo)
调用WebGLCmdFuncCreateFramebuffer生成framebuff 保存在this._gpuFramebuffer.glFramebuffer
同时绑定纹理,深度和Stencil纹理到framebuff
destroy()
调用WebGLCmdFuncDestroyFramebuffer 删除framebuff