aboutsummaryrefslogtreecommitdiff
path: root/tests/test_browser.py
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2014-01-14 17:04:58 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2014-01-14 17:04:58 +0200
commita39788f5020f726cbe6cfcc49de9cc669f445237 (patch)
tree221e61708bbbd3fcf95c1d964f48a3bb3333698e /tests/test_browser.py
parent0e36f078d4a9666303340506638726d316096e07 (diff)
Add GLEW 1.10.0 emulation
Includes library_glew.js that stubs the init functions, but also provides the other functions. GL/glew.h is now changed to work with GLEW_EXT_foo_bar constants, some missing constants that are in GLEW 1.10.0 are also provided. Otherwise it still uses SDL_opengl.h to provide function definitions and other constants. Linaro's GLEW (glew-oes) is also supported to some degree to make it easier to get ES1 and ES2 software using it running. What it lacks: - Some constants and function declarations that are in GLEW 1.10.0 might be missing. - The real glew-es fork also includes normal GL constants and function pointers, this does not. Tests ran: - tests/runner.py browser Real world example using this code (and upcomming glfw3 port) can be found here: http://cloudef.eu/glhck http://cloudef.eu/glhck/qb.html
Diffstat (limited to 'tests/test_browser.py')
-rw-r--r--tests/test_browser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_browser.py b/tests/test_browser.py
index c2eaabb6..23022604 100644
--- a/tests/test_browser.py
+++ b/tests/test_browser.py
@@ -1746,4 +1746,8 @@ keydown(100);keyup(100); // trigger the end
# Now run test in browser
self.btest(path_from_root('tests', 'uuid', 'test.c'), '1')
-
+ def test_glew(self):
+ self.btest(path_from_root('tests', 'glew.c'), expected='1')
+ self.btest(path_from_root('tests', 'glew.c'), args=['-s', 'LEGACY_GL_EMULATION=1'], expected='1')
+ self.btest(path_from_root('tests', 'glew.c'), args=['-DGLEW_MX'], expected='1')
+ self.btest(path_from_root('tests', 'glew.c'), args=['-s', 'LEGACY_GL_EMULATION=1', '-DGLEW_MX'], expected='1')