aboutsummaryrefslogtreecommitdiff
path: root/src/library_egl.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-04-03 17:45:02 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-04-03 17:45:02 -0700
commit664c42d8955711ec2b0e21e676fe3a038f67a7a5 (patch)
tree2780bdeb18eced85fd459c8aad651ac901558aa8 /src/library_egl.js
parent3879a0c9ce74e4602c2c8388b4ddd2b50459ec48 (diff)
refactor library_gl into separate files
Diffstat (limited to 'src/library_egl.js')
-rw-r--r--src/library_egl.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/library_egl.js b/src/library_egl.js
new file mode 100644
index 00000000..6ad226f0
--- /dev/null
+++ b/src/library_egl.js
@@ -0,0 +1,20 @@
+
+var LibraryEGL = {
+ eglGetDisplay: function(x_display) { return 3 },
+ eglInitialize: function(display, majorVersion, minorVersion) { return 1 },
+ eglGetConfigs: function(display, hmm1, hmm2, numConfigs) { return 1 },
+ eglChooseConfig: function(display, attribList, config, hmm, numConfigs) { return 1 },
+ eglCreateWindowSurface: function(display, config, hWnd, hmm) { return 4 },
+
+ eglCreateContext__deps: ['glutCreateWindow', '$GL'],
+ eglCreateContext: function(display, config, hmm, contextAttribs) {
+ _glutCreateWindow();
+ return 1;
+ },
+
+ eglMakeCurrent: function(display, surface, surface, context) { return 1 },
+ eglSwapBuffers: function() {},
+};
+
+mergeInto(LibraryManager.library, LibraryEGL);
+