|
@@ -2,13 +2,12 @@ module BABYLON {
|
|
|
export class GeometryBufferRenderer {
|
|
|
private _scene: Scene;
|
|
|
private _multiRenderTarget: MultiRenderTarget;
|
|
|
- private _effect: Effect;
|
|
|
private _ratio: number;
|
|
|
-
|
|
|
- private _cachedDefines: string;
|
|
|
-
|
|
|
private _enablePosition: boolean = false;
|
|
|
|
|
|
+ protected _effect: Effect;
|
|
|
+ protected _cachedDefines: string;
|
|
|
+
|
|
|
public set renderList(meshes: Mesh[]) {
|
|
|
this._multiRenderTarget.renderList = meshes;
|
|
|
}
|
|
@@ -27,6 +26,14 @@ module BABYLON {
|
|
|
this._createRenderTargets();
|
|
|
}
|
|
|
|
|
|
+ public get scene(): Scene {
|
|
|
+ return this._scene;
|
|
|
+ }
|
|
|
+
|
|
|
+ public get ratio(): number {
|
|
|
+ return this._ratio
|
|
|
+ }
|
|
|
+
|
|
|
constructor(scene: Scene, ratio: number = 1) {
|
|
|
this._scene = scene;
|
|
|
this._ratio = ratio;
|
|
@@ -121,7 +128,7 @@ module BABYLON {
|
|
|
this.getGBuffer().dispose();
|
|
|
}
|
|
|
|
|
|
- private _createRenderTargets(): void {
|
|
|
+ protected _createRenderTargets(): void {
|
|
|
var engine = this._scene.getEngine();
|
|
|
var count = this._enablePosition ? 3 : 2;
|
|
|
|