Hi,
I had a similar issue, and it is probably a bug:
With the SDL2 port to Emscripten, most
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS*) calls after
SDL_GL_CONTEXT_PROFILE_MASK and MAJOR/MINOR will make things fail...
So you need to remove SDL_GL_CONTEXT_FLAGS call, and probably the
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE (or put it before the calls to
PROFILE_MASK/MAJOR/MINOR)
Le 22/07/2019 à 19:44, キャロウ マーク a écrit :
On Jul 19, 2019, at 18:40, キャロウ マーク <[email protected]
<mailto:[email protected]>> wrote:
Here is the SDL_CreateWindow call that is failing.
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK,
SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1);
#if defined(DEBUG)
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
#endif
pswMainWindow= SDL_CreateWindow(
szName,
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
w_width, w_height,
SDL_WINDOW_OPENGL| SDL_WINDOW_RESIZABLE
);
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE and SDL_GL_CONTEXT_DEBUG_FLAG are the
issues here. Except they shouldn’t be. The SDL_GL_SetAttribute
documentation says these settings are *requests* and apps must use
SDL_GL_GetAttribute after window and context creation to see if those
features are available. It looks like a bug in the Emscripten SDL2
port that window creation is failing.
Regards
-Mark
--
You received this message because you are subscribed to the Google
Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/DEA50B6B-ACD8-4F1C-AFFF-E2A8944435C2%40callow.im
<https://groups.google.com/d/msgid/emscripten-discuss/DEA50B6B-ACD8-4F1C-AFFF-E2A8944435C2%40callow.im?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/332eaaa1-42e6-da2c-b442-a8a79f7b84de%40gmail.com.