aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-13 10:38:18 -0400
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-13 10:38:18 -0400
commit3c6ef3a1a20dbba335d9882fde0eb4a80e4a3097 (patch)
treed196806a3fa2c5b7843303d166fd2967b42f21e1
parent4deec2693bbda417b8936e381c4c2b5c6388e931 (diff)
Load the immediate mode and matrix libs for glMatrixMode and glLoadIdentity as well
-rw-r--r--src/library_gl.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index f5235a3f..a26b6032 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -805,6 +805,8 @@ var LibraryGL = {
// OpenGL Immediate Mode matrix routines.
// Note that in the future we might make these available only in certain modes.
+ glMatrixMode__deps: ['$GL', '$GLImmediate', function() { return 'GL.matrix.lib = ' + read('gl-matrix.js') +
+ ';\nGL.immediate = GLImmediate;\nGL.initMatrixLibrary();\n' }],
glMatrixMode: function(mode) {
if (mode == 0x1700 /* GL_MODELVIEW */) {
GL.currentMatrix = 'm';
@@ -824,6 +826,8 @@ var LibraryGL = {
GL.matrix[currentMatrix] = GL.matrixStack[GL.currentMatrix].pop();
},
+ glLoadIdentity__deps: ['$GL', '$GLImmediate', function() { return 'GL.matrix.lib = ' + read('gl-matrix.js') +
+ ';\nGL.immediate = GLImmediate;\nGL.initMatrixLibrary();\n' }],
glLoadIdentity: function() {
GL.matrix.lib.mat4.identity(GL.matrix[GL.currentMatrix]);
},