Fixed loading textures when the window starts hidden.
The viewport automatically resets to the window size when you programmatically resize the window.
This commit is contained in:
parent
f1b459aaf7
commit
aaf23fe8af
7 changed files with 76 additions and 30 deletions
|
@ -412,7 +412,9 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
static void
|
||||
GL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
|
||||
{
|
||||
if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) {
|
||||
if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED ||
|
||||
event->event == SDL_WINDOWEVENT_SHOWN ||
|
||||
event->event == SDL_WINDOWEVENT_HIDDEN) {
|
||||
/* Rebind the context to the window area and update matrices */
|
||||
SDL_CurrentContext = NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue