diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2014-02-19 17:38:17 +0200 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2014-02-19 17:43:00 +0200 |
commit | 68935bec83ac0c0d4b2403f37f228ddba7009dfb (patch) | |
tree | 044f4b9af5bc0f5dac3fa9308bda276219b7e8ee | |
parent | 8733fe4dd302abce2d8916d559f3194439988caf (diff) |
Clean up code formatting in VAO code to adhere to coding conventions. Fix reference to emulated GL VAO options to make the browser VAO tests pass.
-rw-r--r-- | src/library_gl.js | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 84f6a54a..10c8cec9 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1804,19 +1804,19 @@ var LibraryGL = { glGenVertexArrays__deps: ['emulGlGenVertexArrays'], #endif glGenVertexArrays__sig: 'vii', - glGenVertexArrays: function (n , arrays) { + glGenVertexArrays: function (n, arrays) { #if LEGACY_GL_EMULATION - if (GL.vaoExt == null) { - GLImmediate.emulGlGenVertexArrays(n , arrays); - return; - } + if (GL.vaoExt == null) { + _emulGlGenVertexArrays(n, arrays); + return; + } #else #if GL_ASSERTIONS assert(GL.vaoExt, 'Must have OES_vertex_array_object to use vao'); #endif #endif - for (var i = 0; i < n ; i++) { + for(var i = 0; i < n; i++) { var id = GL.getNewId(GL.vaos); var vao = GL.vaoExt.createVertexArrayOES(); vao.name = id; @@ -1831,17 +1831,17 @@ var LibraryGL = { glDeleteVertexArrays__sig: 'vii', glDeleteVertexArrays: function(n, vaos) { #if LEGACY_GL_EMULATION - if (GL.vaoExt == null) { - GLImmediate.emulGlDeleteVertexArrays(n , vaos); - return; - } + if (GL.vaoExt == null) { + _emulGlDeleteVertexArrays(n, vaos); + return; + } #else #if GL_ASSERTIONS assert(GL.vaoExt, 'Must have OES_vertex_array_object to use vao'); #endif #endif - for (var i = 0; i < n; i++) { + for(var i = 0; i < n; i++) { var id = {{{ makeGetValue('vaos', 'i*4', 'i32') }}}; GL.vaoExt.deleteVertexArrayOES(GL.vaos[id]); GL.vaos[id] = null; @@ -1854,10 +1854,10 @@ var LibraryGL = { glBindVertexArray__sig: 'vi', glBindVertexArray: function(vao) { #if LEGACY_GL_EMULATION - if (GL.vaoExt == null) { - GLImmediate.emulGlBindVertexArray(vao); - return; - } + if (GL.vaoExt == null) { + _emulGlBindVertexArray(vao); + return; + } #else #if GL_ASSERTIONS assert(GL.vaoExt, 'Must have OES_vertex_array_object to use vao'); @@ -1873,9 +1873,9 @@ var LibraryGL = { glIsVertexArray__sig: 'ii', glIsVertexArray: function(array) { #if LEGACY_GL_EMULATION - if (GL.vaoExt == null) { - return GLImmediate.emulGlIsVertexArray(array); - } + if (GL.vaoExt == null) { + return _emulGlIsVertexArray(array); + } #else #if GL_ASSERTIONS assert(GL.vaoExt, 'Must have OES_vertex_array_object to use vao'); |