Skip to content

[rlsw] Some platform fixes#5720

Merged
raysan5 merged 3 commits intoraysan5:masterfrom
Bigfoot71:rlsw-update-clean
Apr 4, 2026
Merged

[rlsw] Some platform fixes#5720
raysan5 merged 3 commits intoraysan5:masterfrom
Bigfoot71:rlsw-update-clean

Conversation

@Bigfoot71
Copy link
Copy Markdown
Contributor

@Bigfoot71 Bigfoot71 commented Apr 4, 2026

Fixes compilation errors for DRM and handles resizing for SDL and WIN32


A little validation for WIN32 would be preferable; I don't have a Windows machine to test on, but I simply added this to HandleWindowResize:

#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
swResize(clientSize.cx, clientSize.cy);
#endif

Also, I had added it for RGFW, but when I tried to test it I realized that blitting is not implemented, black screen, so I didn't do anything.

@Bigfoot71
Copy link
Copy Markdown
Contributor Author

Bigfoot71 commented Apr 4, 2026

Also, a small detail, LibraryConfigurations.cmake might need to be reviewed when compiling for DRM with rlsw.

Because it initially forces GLES 2.0 and still tries to link egl-gbm:

elseif ("${PLATFORM}" STREQUAL "DRM")
set(PLATFORM_CPP "PLATFORM_DRM")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
add_definitions(-D_DEFAULT_SOURCE)
add_definitions(-DEGL_NO_X11)
add_definitions(-DPLATFORM_DRM)
find_library(GLESV2 GLESv2)
find_library(EGL EGL)
find_library(DRM drm)
find_library(GBM gbm)
if (NOT CMAKE_CROSSCOMPILING OR NOT CMAKE_SYSROOT)
include_directories(/usr/include/libdrm)
endif ()
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread dl)
set(LIBS_PUBLIC m)

It works fine via rlsw afterwards though, I realized this because I didn't have the dev install for it.

@raysan5 raysan5 merged commit 138ef83 into raysan5:master Apr 4, 2026
16 checks passed
@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Apr 4, 2026

@Bigfoot71 Thanks for the quick fix! I'm testing the Win32 platform and reporting.

In the meantime, maybe @Peter0x44 @manuel5975p @VictorHM or @JohnnyCena123 (on my list of CMake maintainers) can take a look to the CMake issue?

@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Apr 4, 2026

@Bigfoot71 Reviewing PLATFORM_DESKTOP_WIN32 but it still crashes, despite it seems the framebuffer is scaled correctly, or at least the size values in RLSW.framebuffer are correct:

image

trying to increment size but just two pixels width (from 800 to 802) and it works, swResize() is called but I got:

image

Any idea?

@Bigfoot71
Copy link
Copy Markdown
Contributor Author

@raysan5 No real idea right now; everything works under SDL. I'd need to create a Windows VM to inspect it in more detail. I'll keep you posted.

The only thing that comes to mind is to check if clientSize.cx, clientSize.cy corresponds to the drawable area of ​​the window, and not something else... Although I don't see why that would produce this.

@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Apr 4, 2026

@Bigfoot71 Yeah, I checked the clientSize and it seems good, also RLGL.framebuffer properties, it seems the framebuffer is correctly allocated... No worries, I'll keep investigating it after the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rlsw] Window resize not supported, segmentation fault on sw_color8_to_color() [drm] Software renderer, missing/incorrect functions

2 participants