aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
diff options
context:
space:
mode:
authorRemi Papillie <remi.papillie@gmail.com>2013-10-10 22:24:52 +0200
committerRemi Papillie <remi.papillie@gmail.com>2013-10-13 12:41:29 +0200
commit7780bdf73b55683b5910f711a4c0aac201ca5d36 (patch)
tree16d9dbeae3a4a8049473d963224e28efb76f82f6 /src/library_sdl.js
parentad25f01ab4c2dde8017304be3c216511b07f1eaf (diff)
Implemented MSAA for SDL.
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r--src/library_sdl.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index bc4136d4..dc972bd6 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -252,7 +252,11 @@ var LibrarySDL = {
} else {
canvas = Module['canvas'];
}
- var ctx = Browser.createContext(canvas, useWebGL, usePageCanvas);
+
+ var webGLContextAttributes = {
+ antialias: ((SDL.glAttributes[13 /*SDL_GL_MULTISAMPLEBUFFERS*/] != 0) && (SDL.glAttributes[14 /*SDL_GL_MULTISAMPLESAMPLES*/] > 1))
+ };
+ var ctx = Browser.createContext(canvas, useWebGL, usePageCanvas, webGLContextAttributes);
SDL.surfaces[surf] = {
width: width,
height: height,