diff options
author | Rémi Papillié <remi.papillie@gmail.com> | 2013-10-07 01:23:31 +0200 |
---|---|---|
committer | Remi Papillie <remi.papillie@gmail.com> | 2013-10-13 12:41:27 +0200 |
commit | 65a494e7c7d6ed63492f4da6b49b15c98af6a722 (patch) | |
tree | bc7b748abf27da8264255b579e4661b65fd0890b /src/library_glfw.js | |
parent | ebdaf9f98f463ef66c0dd8d1ca358a871309f9cc (diff) |
Implemented antialiasing for GLFW contexts.
The WebGL context is created with antialiasing if GLFW_FSAA_SAMPLES is bigger than 1.
Diffstat (limited to 'src/library_glfw.js')
-rw-r--r-- | src/library_glfw.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/library_glfw.js b/src/library_glfw.js index 5e76071f..b0519e39 100644 --- a/src/library_glfw.js +++ b/src/library_glfw.js @@ -354,7 +354,10 @@ var LibraryGLFW = { throw "Invalid glfwOpenWindow mode."; } - Module.ctx = Browser.createContext(Module['canvas'], true, true); + var contextAttributes = { + antialias: (GLFW.params[0x00020013] > 1) //GLFW_FSAA_SAMPLES + } + Module.ctx = Browser.createContext(Module['canvas'], true, true, contextAttributes); return 1; //GL_TRUE }, |