Browse Source

rename function

Benjamin Guignabert 5 years ago
parent
commit
eee3f39e44
2 changed files with 7 additions and 7 deletions
  1. 2 2
      src/Engines/Extensions/engine.multiRender.ts
  2. 5 5
      src/Rendering/prePassRenderer.ts

+ 2 - 2
src/Engines/Extensions/engine.multiRender.ts

@@ -40,11 +40,11 @@ declare module "../../Engines/thinEngine" {
          * Select a subsets of attachments to draw to.
          * @param attachments gl attachments
          */
-        renderToAttachments(attachments: any[]) : void;
+        bindAttachments(attachments: any[]) : void;
     }
 }
 
-ThinEngine.prototype.renderToAttachments = function(attachments: any[]): void {
+ThinEngine.prototype.bindAttachments = function(attachments: any[]): void {
     const gl = this._gl;
 
     gl.drawBuffers(attachments);

+ 5 - 5
src/Rendering/prePassRenderer.ts

@@ -168,9 +168,9 @@ export class PrePassRenderer {
     public drawBuffers(effect: Effect) {
         if (this.enabled) {
             if (effect._multiTarget) {
-                this._engine.renderToAttachments(this._multiRenderAttachments);
+                this._engine.bindAttachments(this._multiRenderAttachments);
             } else {
-                this._engine.renderToAttachments(this._defaultAttachments);
+                this._engine.bindAttachments(this._defaultAttachments);
             }
         }
     }
@@ -241,9 +241,9 @@ export class PrePassRenderer {
                 this._scene.autoClearDepthAndStencil);
 
             // Clearing other attachment with 0 on all other attachments
-            this._engine.renderToAttachments(this._clearAttachments);
+            this._engine.bindAttachments(this._clearAttachments);
             this._engine.clear(this._clearColor, true, false, false);
-            this._engine.renderToAttachments(this._multiRenderAttachments);
+            this._engine.bindAttachments(this._multiRenderAttachments);
         }
     }
 
@@ -286,7 +286,7 @@ export class PrePassRenderer {
         this._isDirty = false;
 
         if (!this.enabled) {
-            this._engine.renderToAttachments(this._defaultAttachments);
+            this._engine.bindAttachments(this._defaultAttachments);
         }
     }