Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/lidar_odometry_step_1/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
// remains consistent on all systems.
IDI_ICON1 ICON "icon.ico"

// GLFW (used by raylib) only picks up a window/taskbar icon from a
// resource named exactly GLFW_ICON on Windows; without it GLFW falls
// back to the generic IDI_WINLOGO icon at runtime.
GLFW_ICON ICON "icon.ico"


/////////////////////////////////////////////////////////////////////////////
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5126,23 +5126,18 @@ bool initGL(int* argc, char** argv, const std::string& winTitleArg, void (*)(),
(void)argc;
(void)argv;

// No FLAG_MSAA_4X_HINT: on some GPU/driver combinations (seen with an
// NVIDIA PRIME-offloaded context) GLFW's GLX context request for a
// 4x-multisample framebuffer fails outright ("GLX: Failed to create
// context: BadValue"), and raylib/GLFW then segfaults using the broken
// context instead of falling back cleanly. Not worth the crash risk for
// a cosmetic antialiasing hint.
//
// FLAG_WINDOW_HIGHDPI: macOS/GLFW always backs the window with a
// full-resolution Retina framebuffer (rglfw.c's _GLFW_USE_RETINA),
// regardless of this flag -- but rlImGui only reads that real scale
// factor into io.DisplayFramebufferScale (and scales its font atlas
// and mouse coordinates to match) when FLAG_WINDOW_HIGHDPI is set.
// Without it, on a Retina display ImGui assumes 1:1 and everything it
// draws ends up scaled/positioned for a framebuffer a quarter the
// actual size -- menus stretched into oversized black bars, widgets
// rendered as solid blocks from a mis-sampled font atlas.
SetConfigFlags(FLAG_WINDOW_RESIZABLE | FLAG_WINDOW_HIGHDPI);
// FLAG_WINDOW_HIGHDPI on Windows causes issues with the ImGui menu bar and other UI elements being scaled incorrectly, so it's only
// enabled on macOS and Linux. On Windows, raylib's default DPI scaling is used instead.

unsigned int flags = FLAG_WINDOW_RESIZABLE;
#ifdef __APPLE__
flags |= FLAG_WINDOW_HIGHDPI;
#endif //__APPLE__
#if __LINUX__
flags |= FLAG_WINDOW_HIGHDPI;
#endif // __LINUX__

SetConfigFlags(flags);
InitWindow(static_cast<int>(window_width), static_cast<int>(window_height), winTitleArg.c_str());
SetTargetFPS(60);

Expand Down
Binary file added apps/multi_view_tls_registration/resource.aps
Binary file not shown.
5 changes: 5 additions & 0 deletions apps/multi_view_tls_registration/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
// remains consistent on all systems.
IDI_ICON1 ICON "icon.ico"

// GLFW (used by raylib) only picks up a window/taskbar icon from a
// resource named exactly GLFW_ICON on Windows; without it GLFW falls
// back to the generic IDI_WINLOGO icon at runtime.
GLFW_ICON ICON "icon.ico"


/////////////////////////////////////////////////////////////////////////////
//
Expand Down
Loading