Platform detection and the Linux platform layer (SDL3) #10
No assignees
Labels
No labels
area/build
area/content
area/editor
area/engine
area/graphics
area/platform
area/repo-wide
area/tests
area/tools
bug
optional
roadmap
size/L
size/M
size/S
No project
No milestone
Blocks
Depends on
#15 Display scale and HiDPI on both platforms
UnflavoredMeson/Primal_Plus_Plus
#31 Vulkan device, loader, memory and swapchain
UnflavoredMeson/Primal_Plus_Plus
#2 CMake build for Linux next to MSBuild, warnings as errors, pinned downloads
UnflavoredMeson/Primal_Plus_Plus
#6 Logging through primal::log
UnflavoredMeson/Primal_Plus_Plus
Reference
No Branch/Tag specified
Notifications
1 participant
Due date
No due date set.
Reference
UnflavoredMeson/Primal_Plus_Plus#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The engine needs windows, events and input on Linux before anything can be shown there. Win32 stays native on Windows; Linux gets one library for windows, input and the event loop.
Decided
Engine/Common/PlatformDetection.hdefinesPRIMAL_PLATFORM_WINDOWS/PRIMAL_PLATFORM_LINUX; code uses those, never_WIN64.find_package(SDL3 3.2 ... SDL3-shared)) for windows, events and input (Input/InputSDL.cpp). Windows: the existing Win32 code.PRIMAL_GRAPHICS=vulkan|d3d12picks the backend at run time; the default is D3D12 on Windows and Vulkan on Linux.Read first
Engine/Platform/PlatformWin32.cpp,Engine/Platform/Window.h,Engine/Input/InputWin32.cpponmaster.Steps
PlatformDetection.hand replace the_WIN64checks.PlatformLinux.cppwith SDL3: create, resize, close and fullscreen a window.InputSDL.cpp); unknown keys map to the invalid code.Done when
Claude can help with
Learn