aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntoine Lambert <antoine-e.lambert@thalesgroup.com>2013-10-24 10:32:56 +0200
committerAntoine Lambert <antoine-e.lambert@thalesgroup.com>2013-10-24 10:32:56 +0200
commit125779a983801e63e3d01658c18c73afbbf6945c (patch)
tree8ca43c92e6572ce210cdbf30278cf6572dcc0753 /src
parent3263031d4d8abfd11c4173953d942509bc782b81 (diff)
map depth and stencil buffers activation from SDL to WebGL
Diffstat (limited to 'src')
-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 857ab7d4..e652dfc8 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -254,9 +254,13 @@ var LibrarySDL = {
}
var webGLContextAttributes = {
- antialias: ((SDL.glAttributes[13 /*SDL_GL_MULTISAMPLEBUFFERS*/] != 0) && (SDL.glAttributes[14 /*SDL_GL_MULTISAMPLESAMPLES*/] > 1))
+ antialias: ((SDL.glAttributes[13 /*SDL_GL_MULTISAMPLEBUFFERS*/] != 0) && (SDL.glAttributes[14 /*SDL_GL_MULTISAMPLESAMPLES*/] > 1)),
+ depth: (SDL.glAttributes[6 /*SDL_GL_DEPTH_SIZE*/] > 0),
+ stencil: (SDL.glAttributes[7 /*SDL_GL_STENCIL_SIZE*/] > 0)
};
+
var ctx = Browser.createContext(canvas, useWebGL, usePageCanvas, webGLContextAttributes);
+
SDL.surfaces[surf] = {
width: width,
height: height,