OpenGL: Difference between revisions

imported>Pbsds
→‎glxinfo: make option name explicit
m update renamed options
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
__FORCETOC__
__FORCETOC__


You can enable OpenGL by setting <code>hardware.opengl.enable = true;</code> in your <code>/etc/nixos/configuration.nix</code>.
You can enable OpenGL by setting <code>hardware.graphics.enable = true;</code><ref group=note>Renamed from <code>hardware.opengl.enable</code> in [[NixOS]] 24.11</ref> in your <code>/etc/nixos/configuration.nix</code>.


OpenGL must break purity due to the need for hardware-specific linkage. Intel, AMD, and Nvidia have different drivers for example. On NixOS, these libraries are symlinked under
OpenGL must break purity due to the need for hardware-specific linkage. Intel, AMD, and Nvidia have different drivers for example. On NixOS, these libraries are symlinked under
   /run/opengl-driver/lib
   /run/opengl-driver/lib
and optionally (if <code>hardware.opengl.driSupport32Bit</code> is enabled)
and optionally (if <code>hardware.graphics.enable32Bit</code><ref group=note>Renamed from <code>hardware.opengl.driSupport32Bit</code> in [[NixOS]] 24.11</ref> is enabled)
   /run/opengl-driver-32/lib
   /run/opengl-driver-32/lib


Line 44: Line 44:


If <code>glxinfo</code> returns <code>Error: couldn't find RGB GLX visual or fbconfig</code>, ensure you have <code>hardware.opengl.extraPackages = [ pkgs.mesa.drivers ];</code> set.
If <code>glxinfo</code> returns <code>Error: couldn't find RGB GLX visual or fbconfig</code>, ensure you have <code>hardware.opengl.extraPackages = [ pkgs.mesa.drivers ];</code> set.
== Notes ==
<references group=note />


== Related ==
== Related ==


https://nixos.wiki/wiki/Nixpkgs_with_OpenGL_on_non-NixOS
[[Nixpkgs with OpenGL on non-NixOS]]


[[Category: Video]]
[[Category: Video]]