Various improvements
This commit is contained in:
parent
ca2ac3fd2d
commit
8e73aee9ba
18 changed files with 259 additions and 115 deletions
|
|
@ -23,6 +23,10 @@ export abstract class FrameBuffer {
|
|||
this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
public destroy(): void {
|
||||
this.gl.deleteFramebuffer(this.frameBuffer);
|
||||
}
|
||||
|
||||
public setSize(): boolean {
|
||||
const realToCssPixels =
|
||||
(this.enableHighDpiRendering ? window.devicePixelRatio : 1) * this.renderScale;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ export class IntermediateFrameBuffer extends FrameBuffer {
|
|||
this.setSize();
|
||||
}
|
||||
|
||||
public destroy(): void {
|
||||
this.gl.deleteTexture(this.frameTexture);
|
||||
}
|
||||
|
||||
public get colorTexture(): WebGLTexture {
|
||||
return this.frameTexture;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue