Skip to content

Commit

Permalink
fix(webgl): update check for WEBGL_draw_buffers
Browse files Browse the repository at this point in the history
- get extension only when more than one render targets
  • Loading branch information
stwind committed Jul 21, 2019
1 parent a62f50e commit 7df09d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/webgl/src/fbo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class FBO implements IFbo {
constructor(gl: WebGLRenderingContext, opts?: Partial<FboOpts>) {
this.gl = gl;
this.fbo = gl.createFramebuffer() || error("error creating FBO");
this.ext = !isGL2Context(gl)
this.ext = (!isGL2Context(gl) && opts && opts!.tex && opts!.tex!.length > 1)
? gl.getExtension("WEBGL_draw_buffers") ||
error("missing WEBGL_draw_buffers ext")
: undefined;
Expand Down

0 comments on commit 7df09d1

Please sign in to comment.