aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/mandel-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/mandel-material.js')
-rw-r--r--js/lib/rdge/materials/mandel-material.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/js/lib/rdge/materials/mandel-material.js b/js/lib/rdge/materials/mandel-material.js
index d9f00383..a82a4bfc 100644
--- a/js/lib/rdge/materials/mandel-material.js
+++ b/js/lib/rdge/materials/mandel-material.js
@@ -21,11 +21,7 @@ var MandelMaterial = function MandelMaterial() {
21 /////////////////////////////////////////////////////////////////////// 21 ///////////////////////////////////////////////////////////////////////
22 // Properties 22 // Properties
23 /////////////////////////////////////////////////////////////////////// 23 ///////////////////////////////////////////////////////////////////////
24 // no properties 24 // properties inherited from PulseMaterial
25 this._propNames = [];
26 this._propLabels = [];
27 this._propTypes = [];
28 this._propValues = [];
29 25
30 /////////////////////////////////////////////////////////////////////// 26 ///////////////////////////////////////////////////////////////////////
31 // Material Property Accessors 27 // Material Property Accessors
@@ -61,12 +57,12 @@ var MandelMaterial = function MandelMaterial() {
61 if (world) this.setWorld( world ); 57 if (world) this.setWorld( world );
62 58
63 // set up the shader 59 // set up the shader
64 this._shader = new jshader(); 60 this._shader = new RDGE.jshader();
65 this._shader.def = MandelMaterialDef; 61 this._shader.def = MandelMaterialDef;
66 this._shader.init(); 62 this._shader.init();
67 63
68 // set up the material node 64 // set up the material node
69 this._materialNode = createMaterialNode("mandelMaterial" + "_" + world.generateUniqueNodeID()); 65 this._materialNode = RDGE.createMaterialNode("mandelMaterial" + "_" + world.generateUniqueNodeID());
70 this._materialNode.setShader(this._shader); 66 this._materialNode.setShader(this._shader);
71 67
72 this._time = 0; 68 this._time = 0;
@@ -83,14 +79,14 @@ var MandelMaterial = function MandelMaterial() {
83 var material = this._materialNode; 79 var material = this._materialNode;
84 if (material) { 80 if (material) {
85 var technique = material.shaderProgram['default']; 81 var technique = material.shaderProgram['default'];
86 var renderer = g_Engine.getContext().renderer; 82 var renderer = RDGE.globals.engine.getContext().renderer;
87 if (renderer && technique) { 83 if (renderer && technique) {
88 if (this._shader && this._shader['default']) 84 if (this._shader && this._shader['default'])
89 this._shader['default'].u_time.set( [this._time] ); 85 this._shader['default'].u_time.set( [this._time] );
90 this._time = time; 86 this._time = time;
91 } 87 }
92 } 88 }
93 } 89 };
94}; 90};
95 91
96/////////////////////////////////////////////////////////////////////////////////////// 92///////////////////////////////////////////////////////////////////////////////////////