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
Reported in version: HG 2.0 Reported for operating system, platform: All, x86
Comments on the original bug report:
On 2015-08-25 08:32:30 +0000, Angelo wrote:
In src/render/opengl/SDL_render_gl.c on line 389 is GL_CreateRenderer, which upon calling, checks if the current context is a 2.1 context (using RENDERER_CONTEXT_MAJOR and RENDERER_CONTEXT_MINOR) and if the context is not 2.1, it creates a 2.1 context.
If I wanted to create a 3.2 context (for GLSL features and OSX compatibility), this code will create its own 2.1 context and I end up not being able to use the 3.2 features because there's a 2.1 context active.
Why is this necessary? Does SDL_Renderer not work with a newer OpenGL version?
On 2015-08-25 10:04:23 +0000, Angelo wrote:
Created attachment 2252
Test case
I ran a test compiling the given main.cpp against a version of SDL2 that doesn't create a 2.1 context and instead uses the currently active context. (In this case, a 3.2 core profile context)
With SDL2 itself, the window turns pink.
With SDL2 with the 2.1 context creation code in CreateRenderer removed, the window stays black. So my guess is that the 2.1 context is required, but why?
On 2015-08-25 13:47:17 +0000, Angelo wrote:
It appears like the reason the screen remains black is because glRect is not supported since OpenGL 3.0, which is used by SDL_Renderer.
On 2015-08-29 14:47:18 +0000, Alex Szpakowski wrote:
SDL_Render does not have a backend which uses Core Profile OpenGL 3+.
If you want to use OpenGL features directly in a program which uses SDL, I recommend just creating an OpenGL context with SDL_GL_CreateContext and dropping SDL_Render entirely. It's really easy to make things blow up when mixing SDL_Render with direct OpenGL.
On 2016-10-01 21:38:00 +0000, Sam Lantinga wrote:
Marking won't fix for now, since the SDL render API doesn't support Core Profile.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.0
Reported for operating system, platform: All, x86
Comments on the original bug report:
On 2015-08-25 08:32:30 +0000, Angelo wrote:
On 2015-08-25 10:04:23 +0000, Angelo wrote:
On 2015-08-25 13:47:17 +0000, Angelo wrote:
On 2015-08-29 14:47:18 +0000, Alex Szpakowski wrote:
On 2016-10-01 21:38:00 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: