Added shadow, working on UI adapting

This commit is contained in:
Vladislav Khorev committed 2026-06-06 20:32:09 +03:00
1 parent f61a12f874
commit c991b5dbc1
10 files changed
+385817 -37

No files matched your search

+11 -1
View File
@@ -259,7 +259,7 @@ int main(int argc, char *argv[]) {
}*/
const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_FULLSCREEN_DESKTOP;
#else
const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;
const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI;
#endif
ZL::Environment::window = SDL_CreateWindow(
@@ -272,6 +272,16 @@ int main(int argc, char *argv[]) {
SDL_GLContext ctx = SDL_GL_CreateContext(ZL::Environment::window);
SDL_GL_MakeCurrent(ZL::Environment::window, ctx);
// On HiDPI displays the drawable (physical) size is larger than the
// logical window size. Use the drawable size so the GL framebuffer
// covers every physical pixel and the image stays sharp.
{
int drawW, drawH;
SDL_GL_GetDrawableSize(ZL::Environment::window, &drawW, &drawH);
ZL::Environment::width = drawW;
ZL::Environment::height = drawH;
}
game.setup();
while (!game.shouldExit()) {