diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-01-20 13:30:55 -0500 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-01-20 13:30:55 -0500 |
commit | 426ab9f67ac01bdf008168d22d3f8a64ed1d098e (patch) | |
tree | 4e1a1aaa5962b75e1ea39edf280d69892a3d5449 | |
parent | 5f5cc50f22008a402436086aaaaacc8bd8f96d06 (diff) |
Implement a few OpenGL functions for the baby-step demo
-rw-r--r-- | src/library_gl.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index f22eabcb..7e9a20d2 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -66,6 +66,22 @@ var LibraryGL = { Module.ctxGL.bindTexture(target, GL.textures[texture]); }, + glClearColor: function(red, green, blue, alpha) { + Module.ctxGL.clearColor(red, green, blue, alpha); + }, + + glClear: function(mask) { + Module.ctxGL.clear(mask); + }, + + glEnable: function(cap) { + Module.ctxGL.enable(cap); + }, + + glScissor: function(x, y, width, height) { + Module.ctxGL.scissor(x, y, width, height); + }, + }; // Ignored stubs for fixed-function pipeline. We will need to emulate this |