Skip to content

Commit

Permalink
docs: update WebGLRenderer doc
Browse files Browse the repository at this point in the history
  • Loading branch information
06wj committed Jul 3, 2020
1 parent 45855d6 commit 9ce4930
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/renderer/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,19 +427,28 @@ const WebGLRenderer = Class.create(/** @lends WebGLRenderer.prototype */ {
extensions.init(gl);
capabilities.init(gl);
Shader.init(this);

/**
* state,初始化后生成。
* @type {WebGLState}
* @default null
*/
this.state = new WebGLState(gl);

if (!extensions.instanced) {
this.useInstanced = false;
}

this.renderList.useInstanced = this.useInstanced;

if (!extensions.vao) {
this.useVao = false;
}

if (this.useFramebuffer) {
/**
* framebuffer,只在 useFramebuffer 为 true 时初始化后生成
* @type {Framebuffer}
* @default null
*/
this.framebuffer = new Framebuffer(this, Object.assign({
useVao: this.useVao,
width: this.width,
Expand Down

0 comments on commit 9ce4930

Please sign in to comment.