Skip to content

Commit

Permalink
feat: add debug renderer info support
Browse files Browse the repository at this point in the history
  • Loading branch information
bhouston committed Jun 23, 2020
1 parent 9a14c90 commit c22865a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/renderers/webgl/RenderingContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export class RenderingContext {
readonly glx: Extensions;
readonly glxo: OptionalExtensions;
readonly canvasFramebuffer: CanvasFramebuffer;
readonly debugVendor: string;
readonly debugRenderer: string;
// readonly texImage2DPool: TexImage2DPool;
// readonly programPool: ProgramPool;
// readonly bufferPool: BufferPool;
Expand Down Expand Up @@ -57,6 +59,10 @@ export class RenderingContext {
this.glx = new Extensions(this.gl);
this.glxo = new OptionalExtensions(this.gl);

const dri = this.glxo.WEBGL_debug_renderer_info;
this.debugVendor = dri !== null ? this.gl.getParameter(dri.UNMASKED_VENDOR_WEBGL) : "";
this.debugRenderer = dri !== null ? this.gl.getParameter(dri.UNMASKED_RENDERER_WEBGL) : "";

this.canvasFramebuffer = new CanvasFramebuffer(this);
// this.texImage2DPool = new TexImage2DPool(this);
// this.programPool = new ProgramPool(this);
Expand Down

0 comments on commit c22865a

Please sign in to comment.