| Summary: | GL_CreateRenderer forces 2.1 context | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Angelo <spansjh> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | amaranth72 |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | All | ||
| Attachments: | Test case | ||
|
Description
Angelo
2015-08-25 08:32:30 UTC
Created attachment 2252 [details]
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?
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. 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. Marking won't fix for now, since the SDL render API doesn't support Core Profile. |