Jump to content

OpenGL: Difference between revisions

226 bytes added ,  Thursday at 17:21
m
update renamed options
(fix links)
m (update renamed options)
 
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 ==
134

edits