aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/uber-material.js
diff options
context:
space:
mode:
authorhwc4872012-04-06 05:18:48 -0700
committerhwc4872012-04-06 05:18:48 -0700
commit416ce9d4954e0a7f4ee7b9afe43bf691fdb276f4 (patch)
treefbf073f1f371f90e76a36619cb44136c8de83b37 /js/lib/rdge/materials/uber-material.js
parentb6a8f72f670a8edee35554a4ca3a0618c526d651 (diff)
downloadninja-416ce9d4954e0a7f4ee7b9afe43bf691fdb276f4.tar.gz
texture notifications
Diffstat (limited to 'js/lib/rdge/materials/uber-material.js')
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js
index ca244629..71354216 100755
--- a/js/lib/rdge/materials/uber-material.js
+++ b/js/lib/rdge/materials/uber-material.js
@@ -286,6 +286,30 @@ var UberMaterial = function UberMaterial() {
286 } 286 }
287 }; 287 };
288 288
289
290 this.updateTextures = function()
291 {
292 var material = this._materialNode;
293 if (material)
294 {
295 var technique = material.shaderProgram.defaultTechnique;
296 var renderer = g_Engine.getContext().renderer;
297 if (renderer && technique)
298 {
299 if (this._diffuseTexture)
300 {
301 if (!this._diffuseTexture.isAnimated())
302 {
303 this._diffuseTexture.rerender();
304 var tex = this._diffuseTexture.getTexture();
305 technique.s_diffuseMap.set( tex );
306 }
307 }
308 }
309 }
310 }
311
312
289 this.updateSpecularMap = function() { 313 this.updateSpecularMap = function() {
290 var value = this._propValues[ "specularMap" ]; 314 var value = this._propValues[ "specularMap" ];
291 this._specularMapOb.texture = value; 315 this._specularMapOb.texture = value;