Add more improvements
This commit is contained in:
parent
e1c74a8054
commit
bc16bdd62e
29 changed files with 288 additions and 160 deletions
|
|
@ -1,16 +1,17 @@
|
|||
import { vec2 } from 'gl-matrix';
|
||||
import { settings } from '../../settings';
|
||||
|
||||
export abstract class FrameBuffer {
|
||||
public renderScale = 1;
|
||||
public enableHighDpiRendering = settings.enableHighDpiRendering;
|
||||
|
||||
protected size = vec2.create();
|
||||
|
||||
// null means the default framebuffer
|
||||
protected frameBuffer: WebGLFramebuffer | null = null;
|
||||
|
||||
constructor(protected gl: WebGL2RenderingContext) {}
|
||||
constructor(
|
||||
protected gl: WebGL2RenderingContext,
|
||||
private enableHighDpiRendering: boolean
|
||||
) {}
|
||||
|
||||
public bindAndClear(colorInput?: WebGLTexture) {
|
||||
this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, this.frameBuffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue