Added a hint to mark a foreign window as usable with OpenGL

Fixes https://github.com/libsdl-org/SDL/issues/2942
This commit is contained in:
Sam Lantinga
2022-03-17 14:44:34 -07:00
parent 4e49b78a11
commit e5f45455c9
3 changed files with 47 additions and 11 deletions

View File

@@ -422,6 +422,9 @@ WIN_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
}
}
}
} else if (window->flags & SDL_WINDOW_OPENGL) {
/* Try to set up the pixel format, if it hasn't been set by the application */
WIN_GL_SetupWindow(_this, window);
}
}
#endif