aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/cloud-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/cloud-material.js')
-rw-r--r--js/lib/rdge/materials/cloud-material.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/js/lib/rdge/materials/cloud-material.js b/js/lib/rdge/materials/cloud-material.js
index f253718a..cec00696 100644
--- a/js/lib/rdge/materials/cloud-material.js
+++ b/js/lib/rdge/materials/cloud-material.js
@@ -31,7 +31,7 @@ var CloudMaterial = function CloudMaterial() {
31 31
32 // parameter initial values 32 // parameter initial values
33 this._time = 0.0; 33 this._time = 0.0;
34 this._surfaceAlpha = 0.5; 34 this._surfaceAlpha = 1.0;
35 this._zmin = 0.1; 35 this._zmin = 0.1;
36 this._zmax = 10.0; 36 this._zmax = 10.0;
37 37
@@ -125,6 +125,7 @@ var CloudMaterial = function CloudMaterial() {
125 // build a world to do the rendering 125 // build a world to do the rendering
126 this._srcWorld = new GLWorld( this._srcCanvas, true ); 126 this._srcWorld = new GLWorld( this._srcCanvas, true );
127 var srcWorld = this._srcWorld; 127 var srcWorld = this._srcWorld;
128 this._srcCanvas.__GLWorld = srcWorld;
128 129
129 // build the geometry 130 // build the geometry
130 var prim = this.buildGeometry(); 131 var prim = this.buildGeometry();
@@ -174,11 +175,15 @@ var CloudMaterial = function CloudMaterial() {
174 if (renderer && technique) { 175 if (renderer && technique) {
175 var texMapName = this._propValues[this._propNames[0]]; 176 var texMapName = this._propValues[this._propNames[0]];
176 var wrap = 'REPEAT', mips = true; 177 var wrap = 'REPEAT', mips = true;
177 var tex = this.loadTexture( texMapName, wrap, mips ); 178 //var tex = this.loadTexture( texMapName, wrap, mips );
178 179 if (this._glTex)
179 if (tex) { 180 {
180 technique.u_tex0.set( tex ); 181 this._glTex.render();
182 var tex = this._glTex.getTexture();
183 if (tex)
184 technique.u_tex0.set( tex );
181 } 185 }
186
182 } 187 }
183 } 188 }
184 }; 189 };