Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5315

Graphics programming • Re: Disabling /dev/dri/cardX in Pi5

$
0
0
Raspberry Pi 5 creates two different /dev/dri/card0 and 1 for VGA and HDMI instead of a single card like previous models.
That's not what's happening. AFAIU card0 is the 3D rendering card (used by OpenGL, etc), but is can only render into buffers. card1 is 2D and does produce the video signals via HDMI or whatever.

I found this regarding which card SDL uses: https://github.com/libsdl-org/SDL/blob/ ... ideo.c#L82. But even without that, SDL should auto-detect which card to use, if I understand the code correctly. At least on my test Pi5, supertux works out of the box without wayland/X running.
Ohhhh many many thanks for pointing out to this SDL Hint. Setting the same before the video initialisation made the trick:

Code:

SDL_SetHint(SDL_HINT_KMSDRM_DEVICE_INDEX, "0");SDL_Init(SDL_INIT_VIDEO);
Thanks a lot

Statistics: Posted by rTomasa — Sun Mar 17, 2024 11:26 pm



Viewing all articles
Browse latest Browse all 5315

Trending Articles