diff options
Diffstat (limited to 'js/lib/rdge/materials/mandel-material.js')
-rw-r--r-- | js/lib/rdge/materials/mandel-material.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/lib/rdge/materials/mandel-material.js b/js/lib/rdge/materials/mandel-material.js index 4babe239..35ac8ec4 100644 --- a/js/lib/rdge/materials/mandel-material.js +++ b/js/lib/rdge/materials/mandel-material.js | |||
@@ -58,12 +58,12 @@ var MandelMaterial = function MandelMaterial() { | |||
58 | if (world) this.setWorld( world ); | 58 | if (world) this.setWorld( world ); |
59 | 59 | ||
60 | // set up the shader | 60 | // set up the shader |
61 | this._shader = new jshader(); | 61 | this._shader = new RDGE.jshader(); |
62 | this._shader.def = MandelMaterialDef; | 62 | this._shader.def = MandelMaterialDef; |
63 | this._shader.init(); | 63 | this._shader.init(); |
64 | 64 | ||
65 | // set up the material node | 65 | // set up the material node |
66 | this._materialNode = createMaterialNode("mandelMaterial" + "_" + world.generateUniqueNodeID()); | 66 | this._materialNode = RDGE.createMaterialNode("mandelMaterial" + "_" + world.generateUniqueNodeID()); |
67 | this._materialNode.setShader(this._shader); | 67 | this._materialNode.setShader(this._shader); |
68 | 68 | ||
69 | this._time = 0; | 69 | this._time = 0; |
@@ -84,14 +84,14 @@ var MandelMaterial = function MandelMaterial() { | |||
84 | var material = this._materialNode; | 84 | var material = this._materialNode; |
85 | if (material) { | 85 | if (material) { |
86 | var technique = material.shaderProgram['default']; | 86 | var technique = material.shaderProgram['default']; |
87 | var renderer = g_Engine.getContext().renderer; | 87 | var renderer = RDGE.globals.engine.getContext().renderer; |
88 | if (renderer && technique) { | 88 | if (renderer && technique) { |
89 | if (this._shader && this._shader['default']) | 89 | if (this._shader && this._shader['default']) |
90 | this._shader['default'].u_time.set( [this._time] ); | 90 | this._shader['default'].u_time.set( [this._time] ); |
91 | this._time = time; | 91 | this._time = time; |
92 | } | 92 | } |
93 | } | 93 | } |
94 | } | 94 | }; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | /////////////////////////////////////////////////////////////////////////////////////// | 97 | /////////////////////////////////////////////////////////////////////////////////////// |