You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it normal that if I have a hidden base shared SDL OpenGL context with SDL_GL_STENCIL_SIZE=0 and then I create a window with its own SDL OpenGL context (that shares the base one) with SDL_GL_STENCIL_SIZE=8, then stencil testing doesn't work at all?
I also need to set the stencil size of the shared context to 8, but that doesn't make much sense as I'm not creating/using any framebuffer on the shared context.
As an additional data point, when recreating the same situation under SFML 3.x, the behavior is as I expect -- the shared context doesn't need to set any stencil or depth bits, and as long as the window context sets the correct amount, it works properly. SFML's internals also pass 0 to the shared context settings, so this seems like a SDL quirk.
Is it intended or a bug?
This is how I create my hidden base shared context:
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 0);
// ...other attributes...// Create a hidden window for the context
m_window = SDL_CreateWindow("", 1, 1, SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN);
if (m_window == nullptr) { /* ...error handling... */ }
// Create the OpenGL context
m_context = SDL_GL_CreateContext(m_window);
if (!m_context) { /* ...error handling... */ }
Is it normal that if I have a hidden base shared SDL OpenGL context with
SDL_GL_STENCIL_SIZE=0
and then I create a window with its own SDL OpenGL context (that shares the base one) withSDL_GL_STENCIL_SIZE=8
, then stencil testing doesn't work at all?I also need to set the stencil size of the shared context to 8, but that doesn't make much sense as I'm not creating/using any framebuffer on the shared context.
As an additional data point, when recreating the same situation under SFML 3.x, the behavior is as I expect -- the shared context doesn't need to set any stencil or depth bits, and as long as the window context sets the correct amount, it works properly. SFML's internals also pass 0 to the shared context settings, so this seems like a SDL quirk.
Is it intended or a bug?
This is how I create my hidden base shared context:
And this is how I create my window context:
The text was updated successfully, but these errors were encountered: