Use webgl 2.0
This commit is contained in:
parent
aba490f4d6
commit
ca96c95143
2 changed files with 14 additions and 1 deletions
13
src/main.cpp
13
src/main.cpp
|
@ -79,6 +79,19 @@ int rgssThreadFun(void *userdata)
|
|||
/* Setup GL context */
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
/* Set the color space to 24 bit */
|
||||
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
|
||||
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
|
||||
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
|
||||
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0);
|
||||
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0);
|
||||
|
||||
/* Use WebGL 2.0 */
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
|
||||
#endif
|
||||
|
||||
if (conf.debugMode)
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue