Ryan C. Gordon
Ryan C. Gordon
My instinct is we need to scale the viewport from what it was to the new DPI, or this is going to be broken, which is going to need a...
Gonna reopen this (and move it to 2.26)...Ethan's fix is good, but we want to try to preserve the existing viewport instead of reset it to the whole window.
I can reproduce here, now (and reproduce it on OpenGL and Metal). Digging in.
For OpenGL: ```c data->drawstate.target = renderer->target; if (!data->drawstate.target) { int w, h; SDL_GL_GetDrawableSize(renderer->window, &w, &h); if ((w != data->drawstate.drawablew) || (h != data->drawstate.drawableh)) { data->drawstate.viewport_dirty = SDL_TRUE; // if the...
Metal also sets `statecache.viewport_dirty = SDL_TRUE;` at the start of every command queue (and the GL renderer has an `#ifdef MACOSX` at the start that always forces this regardless of...
Ok, yes, this seems to be the case...when there's a display change, we set the viewport to the whole window, regardless of what it was set to by the app,...
I think @hanseuljun's patch is good for 2.0.16, but I'd like to spend some time looking at why this flag doesn't get set correctly, triggering the assertion, before 2.0.18. It...
Going to do this one in 2.26 as early-in-milestone, so I don't accidentally break OpenGL on a random platform at the last moment.
Taking a stab at this now. My goal is going to be to move driver_loaded management to the upper level, and make it increment/decrement, and only load/unload things when it...
Interestingly, SDL_GL_LoadLibrary isn't interested in reference counting this: ```c if (_this->gl_config.driver_loaded) { if (path && SDL_strcmp(path, _this->gl_config.driver_path) != 0) { return SDL_SetError("OpenGL library already loaded"); } retval = 0; ```...