this post was submitted on 20 Apr 2024
10 points (100.0% liked)

SBC Gaming

1045 readers
1 users here now

SBC Gaming is for Single Board Computer aimed to play video-games, also called Retro Handhelds


Rules

  1. No bigotry or hate-speech

  2. No harassement or doxing

  3. No promotion of your products without asking moderation

  4. No NSFW

founded 1 year ago
MODERATORS
 

TL;DR: What linux API should be used to render a game to the screen on the RG35XXH?

I'm trying to port a solitaire game to the RG35XXH. Currently I'm using GLFW to get a window on my laptop; however GLFW doesn't support running without an X11 or Wayland server running.

I looked into EGL, which worked, kind of. It can fetch an OpenGL ES context but it has no way to display the rendered framebuffer to the screen.

Most recently I looked into KMS + DRM. I found a repository with code explaining how to interface with the DRM, and got it working on my laptop, which is nice! However on the RG35XXH (with Batocera v40) there is no /dev/dri/ folder 😦 . I can only assume that this means Batocera doesn't use DRI/DRM/KMS at the moment.

Next I might try using a frame buffer device. Running cat /dev/urandom > /dev/fb0 fills the screen with random colors; so I should be able to implement rendering with it. However I don't know if this is the correct route to go.

Now, as I understand it, SDL2 is supposed to support rendering to these types of devices. I've been avoiding SDL2 as I would prefer to distribute the program as a single executable file, and its license makes that more difficult.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here