Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Put the factory methods on MagicProgram.

  • Loading branch information...
commit 57581b3cb7d172af1872342201a46af91ed48316 1 parent b578a86
Dean McNamee deanm authored
Showing with 3 additions and 6 deletions.
  1. +1 −1  examples/500_triangle/app.js
  2. +2 −5 plask.js
2  examples/500_triangle/app.js
View
@@ -16,7 +16,7 @@ plask.simpleWindow({
this.framerate(30);
- this.mprogram = plask.gl.createMagicProgramFromFiles(
+ this.mprogram = plask.gl.MagicProgram.createFromFiles(
gl,
path.join(__dirname, 'app.vshader'),
path.join(__dirname, 'app.fshader'));
7 plask.js
View
@@ -1356,7 +1356,7 @@ function MagicProgram(gl, program) {
}
}
-function createMagicProgramFromFiles(gl, vfn, ffn) {
+MagicProgram.createFromFiles = function(gl, vfn, ffn) {
return new MagicProgram(gl, webGLcreateProgramFromShaderSources(
gl, fs.readFileSync(vfn, 'utf8'), fs.readFileSync(ffn, 'utf8')));
}
@@ -1376,7 +1376,4 @@ exports.Vec2 = Vec2;
exports.Vec4 = Vec4;
exports.Mat4 = Mat4;
-exports.gl = {
- MagicProgram: MagicProgram,
- createMagicProgramFromFiles: createMagicProgramFromFiles
-};
+exports.gl = {MagicProgram: MagicProgram};
Please sign in to comment.
Something went wrong with that request. Please try again.