aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/water-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/water-material.js')
-rw-r--r--js/lib/rdge/materials/water-material.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/water-material.js b/js/lib/rdge/materials/water-material.js
index 37836636..2c3669c0 100644
--- a/js/lib/rdge/materials/water-material.js
+++ b/js/lib/rdge/materials/water-material.js
@@ -5,6 +5,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
5</copyright> */ 5</copyright> */
6 6
7var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial; 7var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial;
8var Texture = require("js/lib/rdge/texture").Texture;
8 9
9/////////////////////////////////////////////////////////////////////// 10///////////////////////////////////////////////////////////////////////
10// Class GLMaterial 11// Class GLMaterial
@@ -67,6 +68,9 @@ var WaterMaterial = function WaterMaterial() {
67 this._shader['default'].u_time.set([this._time]); 68 this._shader['default'].u_time.set([this._time]);
68 } 69 }
69 70
71 var texMapName = this._propValues[this._propNames[0]];
72 this._glTex = new Texture( world, texMapName );
73
70 // set the shader values in the shader 74 // set the shader values in the shader
71 this.updateTexture(); 75 this.updateTexture();
72 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]); 76 this.setResolution([world.getViewportWidth(), world.getViewportHeight()]);