OPENGL EMSCRIPTEN: clean up ifdefs, fix opengl in main menu, remove 10ms delay in GRIM main loop

This commit is contained in:
Christian Kündig 2021-06-07 15:05:48 +02:00 committed by Eugene Sandulenko
parent 7c4fdc1b94
commit 8af8ac2e08
4 changed files with 10 additions and 12 deletions

View file

@ -180,8 +180,9 @@ void OpenGLSdlGraphics3dManager::setupScreen() {
// So check if the window needs to be recreated.
int currentSamples = 0;
#if defined(EMSCRIPTEN)
// SDL_GL_MULTISAMPLESAMPLES isn't available on the WebGL context (or not bridged in Emscripten?), let's just reset the windows every time
#if defined(__EMSCRIPTEN__)
// SDL_GL_MULTISAMPLESAMPLES isn't available on a WebGL 1.0 context
// (or not bridged in Emscripten?). This forces a windows reset.
currentSamples = -1;
#else
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &currentSamples);