@animech-public/playcanvas
Version:
PlayCanvas WebGL game engine
54 lines (53 loc) • 1.67 kB
TypeScript
/**
* A WebGL implementation of the RenderTarget.
*
* @ignore
*/
export class WebglRenderTarget {
_glFrameBuffer: any;
_glDepthBuffer: any;
_glResolveFrameBuffer: any;
/**
* A list of framebuffers created When MSAA and MRT are used together, one for each color buffer.
* This allows color buffers to be resolved separately.
*
* @type {FramebufferPair[]}
*/
colorMrtFramebuffers: FramebufferPair[];
_glMsaaColorBuffers: any[];
_glMsaaDepthBuffer: any;
/**
* The supplied single-sampled framebuffer for rendering. Undefined represents no supplied
* framebuffer. Null represents the default framebuffer. A value represents a user-supplied
* framebuffer.
*/
suppliedColorFramebuffer: any;
_isInitialized: boolean;
destroy(device: any): void;
get initialized(): boolean;
init(device: any, target: any): void;
_createMsaaMrtFramebuffers(device: any, target: any, colorBufferCount: any): void;
/**
* Checks the completeness status of the currently bound WebGLFramebuffer object.
*
* @private
*/
private _checkFbo;
loseContext(): void;
internalResolve(device: any, src: any, dst: any, target: any, mask: any): void;
resolve(device: any, target: any, color: any, depth: any): void;
}
/**
* A private class representing a pair of framebuffers, when MSAA is used.
*
* @ignore
*/
declare class FramebufferPair {
constructor(msaaFB: any, resolveFB: any);
/** Multi-sampled rendering framebuffer */
msaaFB: any;
/** Single-sampled resolve framebuffer */
resolveFB: any;
destroy(gl: any): void;
}
export {};