site  contact  subhomenews

OpenGL fixed in containers

October 07, 2022 — BarryK

I posted about Chrome running in a container, complaining about broken openGL:

https://bkhome.org/news/202210/chrome-running-in-container-as-user-spot.html

SupeTuxKart also gave errors about broken openGL, and did not work in a container, so I constrained it to install in the main filesystem only:

https://bkhome.org/news/202210/supertuxkart-version-13-sfs-created.html

I figured out how to get openGL working in containers; achieved by mount-binding /dev/dri on /dev/dri inside the container. This is now a checkbox "3D graphics":

img1

...this is a GUI window when run the 'dir2sfs' utility, or configure an installed SFS via the menu "Filesystem -> Easy Container Management". Here is the "Access" section help:

img2

Now SuperTuxKart works in a container. I have rebuilt the SFS and re-uploaded it. However, this new "3D graphics" checkbox will not work, it will require the next release of EasyOS, expected to be version 4.4.1. Meaning SuperTuxKart will not work in a container until EasyOS 4.4.1 is released.

Curiously, I tested Firefox in a container, without "3D graphics" ticked, and webGL does work -- tested here: https://get.webgl.org/

WebGL uses openGL, so I suppose if openGL is determined by the browser to be broken, it must have a fallback. I don't know enough about the subject to understand what is going on. I presume it just falls back to software rendering, which will be slower.

EDIT:
The checkbox title "3D graphics" is misleading, have changed it to "accel. graphics", as that is really what DRI provides; hardware accelerated graphics.
  

Tags: easy