RLSW shows black screen on Desktop (GLFW) with infinite FPS, but TakeScreenshot works correctly #5880
Unanswered
WILL-Moxyz
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I was experimenting with the RLSW software renderer (compiled with -DRLSW=ON) on Windows using the Desktop (GLFW) platform, but I’m running into a black screen issue.
The Problem:
When I run a basic drawing example, the application window remains completely black. Interestingly, the FPS runs extremely high (jumping from 1800 down to 160 over time).
However, the CPU rendering seems to be working perfectly, because calling TakeScreenshot() saves a correct image with all the drawn graphics (circles, text, etc.).
My Investigation:
I did a little digging into the source code and noticed a difference between platforms:
In rcore_web.c, the SwapScreenBuffer() function has a specific #if defined(GRAPHICS_API_OPENGL_SOFTWARE) block that copies the RLSW CPU framebuffer to the HTML5 canvas for display.
But in rcore_desktop_glfw.c, the SwapScreenBuffer() function only calls glfwSwapBuffers() and has no such RLSW handling.
Since RLSW intercepts OpenGL calls via macros, it seems glfwSwapBuffers() just swaps an empty native OpenGL buffer on desktop, leaving the RLSW framebuffer unblitted to the screen.
My Question:
Is RLSW currently only intended/supported for the Web platform? Or is this a missing implementation in the GLFW desktop backend that causes the black screen?
Any insights would be appreciated! Thanks for the amazing library.
Beta Was this translation helpful? Give feedback.
All reactions