aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-12 18:12:41 -0400
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-12 18:12:41 -0400
commit55d9a3bc975cb4e9fefb79aeca6d5b9ef5fcea1f (patch)
tree5b0d017720f2244197c6284e31533ac60ef28706
parent3f72c46133128715d7dd30f4bc89f82e78344cb4 (diff)
Final fixes
-rw-r--r--src/library_gl.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index e77669d6..d7bf31ea 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -14,6 +14,7 @@ var LibraryGL = {
uniforms: {},
shaders: {},
+ // The folowing data structures are used for OpenGL Immediate Mode matrix routines.
matrix: {
'm': null, // modelview
'p': null // projection
@@ -798,7 +799,7 @@ var LibraryGL = {
return Module.ctx.isFramebuffer(fb);
},
- // OpenGL matrix routines.
+ // OpenGL Immediate Mode matrix routines.
// Note that in the future we might make these available only in certain modes.
glMatrixMode: function(mode) {
if (mode == 0x1700 /* GL_MODELVIEW */) {
@@ -1016,7 +1017,9 @@ var LibraryGL = {
}
},
- glBegin__deps: ['$GL', function() { return 'GL.matrix.lib = ' + read('gl-matrix.js') }],
+ glBegin__deps: ['$GL', function() { return 'GL.matrix.lib = ' + read('gl-matrix.js') + ';\n' +
+ 'GL.initMatrixLibrary();'
+ }],
glBegin: function() {
Module.print('TODO');
}