「OpenGL」の版間の差分
(→Installation: 翻訳) |
(同期) |
||
(2人の利用者による、間の13版が非表示) | |||
1行目: | 1行目: | ||
− | [[Category:グラフィック]] |
+ | [[Category:グラフィックス]] |
[[Category:開発]] |
[[Category:開発]] |
||
[[en:OpenGL]] |
[[en:OpenGL]] |
||
wikipedia [[wikipedia:ja:OpenGL|OpenGL]] から: |
wikipedia [[wikipedia:ja:OpenGL|OpenGL]] から: |
||
− | : OpenGL (Open Graphics Library) は、 |
+ | : OpenGL (Open Graphics Library) は、グラフィックスハードウェア向けの2次元/3次元コンピュータグラフィックスライブラリである。SGI 社内で自社の CG ワークステーション向けにクローズドに策定された API 仕様が改良されて公開されています。 |
詳しくは、[https://www.khronos.org/opengl/ Khronos] をご覧ください。 |
詳しくは、[https://www.khronos.org/opengl/ Khronos] をご覧ください。 |
||
+ | |||
+ | OpenGL の開発は 2017 年に終了し、より新しいハードウェアで高いパフォーマンスを提供する "次世代" API である [[Vulkan]] に移行しました。 |
||
== インストール == |
== インストール == |
||
− | OpenGL を使 |
+ | OpenGL を使用するアプリケーションを実行するには、ハードウェア (GPU または CPU) に適したドライバを[[インストール]]する必要があります。 |
+ | {{Tip| |
||
− | * {{Pkg|mesa}} はオープンソースの OpenGL 実装で、最新の OpenGL 仕様をサポートするために継続的に更新されています。Intel グラフィックス]]、[[ATI]]、[[AMDGPU|AMD]]、[[AMDGPU PRO|AMD PRO]] および [[NVIDIA]] のためのオープンソースドライバが集められています。また、ソフトウェアラスタライザーも提供します。パッケージに含まれるドライバは以下の通りです。 |
||
+ | * AMD(および ATI)の場合、特別な理由がない限りオープンソースドライバーの使用が推奨されます。 |
||
− | ** {{ic|i915}} : GMA 916G および i830、i845、i865 統合 GPU シリーズ用です。 |
||
+ | * NVIDIA の場合、[https://nouveau.freedesktop.org/CodeNames.html#NVE0 Kepler(NVE0/GK''XXX'')] シリーズより新しいカードではプロプライエタリ (独自) ドライバーを使用するのが推奨されます。一般的にパフォーマンスも向上します。 |
||
− | ** {{ic|i965}} : Intel の Gen 4 ハードウェア以降に対応。インテルにより公式にサポートされています。 |
||
+ | }} |
||
− | ** {{ic|iris}} : Intel の Gen8 ハードウェア以降に対応。インテルにより公式にサポートされています。 |
||
− | ** AMD Radeon R100 GPU シリーズ用です。 |
||
− | ** AMD Radeon R200 GPU シリーズ用。 |
||
− | ** AMD Radeon R300, R400, R500 GPU シリーズ用。 |
||
− | ** AMD Radeon HD 2000 GPU シリーズ以降に対応。AMD が公式にサポートしています。 |
||
− | ** {{ic|radeonsi}} : AMD の Southern Island GPU 以降のシリーズ用。AMD が公式にサポートしています。 |
||
− | ** {{ic|nouveau}} : [[Nouveau]] は [[NVIDIA]] 用のオープンソースドライバです。GPU の場合。 |
||
− | ** {{ic|virgl}} : 仮想マシン用にホストと GPU を共有するための仮想 GPU ドライバです。 |
||
− | ** {{ic|svga}} : VMware の仮想 GPU 用です。 |
||
− | ** {{ic|zink}} : Gallium ライバで、vulkan 上で OpenGL を動作させることができます。 |
||
− | ** {{ic|swrast}} : レガシーソフトウェア rasterizer です。 |
||
− | ** {{ic|softpipe}} : ソフトウェア rasterizer、リファレンス Gallium ドライバです。 |
||
− | ** {{ic|llvmpipe}} : ソフトウェア rasterizer、x86 JIT コード生成に LLVM を使用し、マルチスレッド化されています。 |
||
− | ** {{ic|swr}} : AVX および AVX2 CPU 命令を使用する高性能ソフトウェア rasterizer [https://www.openswr.org/ OpenSWR] としても知られています。 |
||
− | {{Note|mesa に適したドライバが自動的に選択されるはずですので、設定する必要はありません。}} |
||
+ | {{Note| |
||
− | * {{Pkg|nvidia-utils}} は [[NVIDIA]] GPU 用のプロプライエタリドライバです。 |
||
+ | * Intel の Gen''N'' ハードウェアは CPU の世代ではなく、[[Wikipedia:List of Intel graphics processing units|GPU の世代]]を指します。 |
||
+ | * AMD (および ATI) GPU のファミリーを調べるには、[[Wikipedia:List of AMD graphics processing units#Features overview]] を参照してください。 |
||
+ | * NVIDIA GPU のコードネームを調べるには、[https://nouveau.freedesktop.org/CodeNames.html Nouveau プロジェクトのコードネームリスト] を確認してください。 |
||
+ | }} |
||
+ | [https://mesa3d.org/ Mesa] は、最新の OpenGL 仕様をサポートするオープンソースの OpenGL 実装です。Intel、AMD (旧 ATI)、NVIDIA の GPU 向けのオープンソースドライバを提供し、ソフトウェア [[Wikipedia:Rasterisation|ラスタライザ]](llvmpipe など)も備えています。 |
||
− | * {{AUR|amdgpu-pro-libgl}} は [[AMDGPU PRO|AMD PRO]] GPU 用のプロプライエタリドライバです。 |
||
+ | Mesa には 2 つのパッケージがあり、それぞれ異なるドライバを含んでいます。 |
||
− | {{Tip| |
||
− | * AMD (および ATI) では、プロプライエタリなものを使用する非常に強い理由がない限り、オープンソースのドライバを使用することをお勧めします。 |
||
− | * NVIDIA では、プロプライエタリドライバをインストールした方が、新しいカードや一般的なパフォーマンスが向上する場合がほとんどです。}} |
||
+ | * {{Pkg|mesa}} は、最新のハードウェア向けの Mesa パッケージで、以下のようなモダンなドライバーを含みます。 |
||
− | == Verification == |
||
+ | ** {{ic|r300}} : AMD Radeon R300、R400、R500 GPU 向け。 |
||
+ | ** {{ic|r600}} : AMD Radeon R600 から Northern Islands までの GPU 向け (AMD 公式サポート) |
||
+ | ** {{ic|radeonsi}} : AMD Southern Island 以降の GPU 向け (AMD 公式サポート) |
||
+ | ** {{ic|nouveau}} : NVIDIA 向けオープンソースドライバー [[Nouveau]] |
||
+ | ** {{ic|virtio_gpu}} : [[QEMU]] ベースの VMM ([[KVM]] や [[Xen]] など) 向けの仮想 GPU ドライバ。 |
||
+ | ** {{ic|vmwgfx}} : [[VMware]] の仮想 GPU 向け。 |
||
+ | ** {{ic|i915}} : Intel Gen 3 GPU 向け。 |
||
+ | ** {{ic|crocus}} : Intel Gen 4 Gen 7 GPU 向け。 |
||
+ | ** {{ic|iris}} : Intel Gen 8 以降の GPU 向け (Intel 公式サポート) |
||
+ | ** {{ic|zink}} : [[Vulkan]] 上で OpenGL を実行するための Gallium ドライバー。 |
||
+ | ** {{ic|d3d12}} : [[WSL]] など、D3D12 のみをサポートするデバイス向けの OpenGL 3.3 ドライバー。 |
||
+ | ** {{ic|swrast}} : レガシーなソフトウェアラスタライザ。Mesa 22.0.0 で廃止されたが、ソースコードには残存 (ArchLinux では 24.1.1 で依然利用可能[https://gitlab.archlinux.org/archlinux/packaging/packages/mesa/-/blob/main/PKGBUILD?ref_type=heads#L140]) |
||
+ | ** {{ic|softpipe}} : ソフトウェアラスタライザかつ Gallium のリファレンスドライバ。 |
||
+ | ** {{ic|llvmpipe}} : LLVM を使用した x86 JIT コード生成によるマルチスレッド対応のソフトウェアラスタライザ。 |
||
+ | * {{Pkg|mesa-amber}} は、古いハードウェア向けのクラシック(Gallium3D 非対応)ドライバーを含むパッケージです。 |
||
− | To verify your OpenGL installation you can use {{Pkg|mesa-utils}} {{ic|glxinfo}} and you should get output like this : |
||
+ | ** {{ic|i830}} : Intel Gen 2 GPU 向け({{ic|i965}} と同じバイナリ) |
||
+ | ** {{ic|i915}} : Intel Gen 3 GPU 向け({{ic|i965}} と同じバイナリ) |
||
+ | ** {{ic|i965}} : Intel Gen 4 Gen 11 GPU 向け(Intel 公式サポート) |
||
+ | ** {{ic|radeon}} : AMD Radeon R100 GPU 向け({{ic|r200}} と同じバイナリ) |
||
+ | ** {{ic|r200}} : AMD Radeon R200 GPU 向け。 |
||
+ | ** {{ic|nouveau_vieux}} : NVIDIA NV04(Fahrenheit)NV20(Kelvin)GPU 向け。 |
||
+ | ** {{ic|swrast}} : レガシーなソフトウェアラスタライザ。 |
||
+ | {{Note|Mesa を使用する場合、適切なドライバーは自動的に選択されるため、パッケージをインストールするだけで追加設定は不要です。}} |
||
− | {{hc|1=$ glxinfo {{!}} grep OpenGL|2= |
||
+ | |||
− | OpenGL vendor string: X.Org |
||
+ | * {{Pkg|nvidia-utils}} : NVIDIA GPU 向けのプロプライエタリ (独自) ドライバ (OpenGL 実装を含む) |
||
− | OpenGL renderer string: AMD RV620 (DRM 2.50.0 / 5.10.12-arch1-1, LLVM 11.0.1) |
||
+ | |||
− | OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.3.4 |
||
+ | * {{AUR|amdgpu-pro-oglp}} : AMD GPU 向けの [[AMDGPU PRO|プロプライエタリドライバ]] |
||
− | OpenGL core profile shading language version string: 3.30 |
||
+ | |||
− | OpenGL core profile context flags: (none) |
||
+ | == 検証 == |
||
− | OpenGL core profile profile mask: core profile |
||
+ | |||
− | OpenGL core profile extensions: |
||
+ | OpenGL のインストールを確認するには、{{Pkg|mesa-utils}} の {{ic|eglinfo}} を使用できます。実行すると、環境に応じた異なる値を含む以下のような出力が表示されるはずです。 |
||
− | OpenGL version string: 3.0 Mesa 20.3.4 |
||
+ | |||
− | OpenGL shading language version string: 1.30 |
||
+ | {{hc|1=$ eglinfo -B|2= |
||
− | OpenGL context flags: (none) |
||
+ | |||
− | OpenGL extensions: |
||
+ | Wayland platform: |
||
− | OpenGL ES profile version string: OpenGL ES 3.0 Mesa 20.3.4 |
||
+ | EGL API version: 1.4 |
||
− | OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00 |
||
+ | EGL vendor string: Mesa Project |
||
− | OpenGL ES profile extensions: |
||
+ | EGL version string: 1.4 |
||
+ | EGL client APIs: OpenGL OpenGL_ES |
||
+ | OpenGL compatibility profile vendor: Mesa Project |
||
+ | OpenGL compatibility profile renderer: i915 (chipset: Pineview M) |
||
+ | OpenGL compatibility profile version: 2.1 Mesa 23.1.5 |
||
+ | OpenGL compatibility profile shading language version: 1.20 |
||
+ | OpenGL ES profile vendor: Mesa Project |
||
+ | OpenGL ES profile renderer: i915 (chipset: Pineview M) |
||
+ | OpenGL ES profile version: OpenGL ES 2.0 Mesa 23.1.5 |
||
+ | OpenGL ES profile shading language version: OpenGL ES GLSL ES 1.0.16 |
||
+ | |||
+ | X11 platform: |
||
+ | EGL API version: 1.5 |
||
+ | EGL vendor string: Mesa Project |
||
+ | EGL version string: 1.5 |
||
+ | EGL client APIs: OpenGL OpenGL_ES |
||
+ | OpenGL core profile vendor: Mesa |
||
+ | OpenGL core profile renderer: llvmpipe (LLVM 15.0.7, 128 bits) |
||
+ | OpenGL core profile version: 4.5 (Core Profile) Mesa 23.1.5 |
||
+ | OpenGL core profile shading language version: 4.50 |
||
+ | OpenGL compatibility profile vendor: Mesa |
||
+ | OpenGL compatibility profile renderer: llvmpipe (LLVM 15.0.7, 128 bits) |
||
+ | OpenGL compatibility profile version: 4.5 (Compatibility Profile) Mesa 23.1.5 |
||
+ | OpenGL compatibility profile shading language version: 4.50 |
||
+ | OpenGL ES profile vendor: Mesa |
||
+ | OpenGL ES profile renderer: llvmpipe (LLVM 15.0.7, 128 bits) |
||
+ | OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.1.5 |
||
+ | OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20 |
||
}} |
}} |
||
− | (with different values depending on your setup, of course) |
||
+ | X11プラットフォームでは、{{ic|glxinfo}} も使用できます。 |
||
− | From the same package you can also try {{ic|glxgears}}, you should see 3 rotating gears. |
||
+ | 同じパッケージには、基本的な OpenGL テストとして {{ic|eglgears_x11}} や {{ic|glxgears}}(X11上)、または {{ic|eglgears_wayland}}(Wayland 上)を使用することもできます。プログラムを実行すると、3つの回転するギアが表示されるはずです。 |
||
− | == Switching between drivers == |
||
+ | == ドライバの切り替え == |
||
− | For [[Hybrid graphics]] you might want to see [[PRIME]]. |
||
+ | |||
− | {{Note|According to a [https://www.reddit.com/r/linuxhardware/comments/he9nhe/amd_and_nvidia_gpus_in_the_same_machine_it_works/ reddit post] can have 2 GPUs from different vendors working concurrently just fine.}} |
||
+ | [[ハイブリッドグラフィック]] については、[[PRIME]] を見て下さい。 |
||
+ | {{Note|[https://www.reddit.com/r/linuxhardware/comments/he9nhe/amd_and_nvidia_gpus_in_the_same_machine_it_works/ reddit post] によると、異なるベンダーの2つの GPU を同時にうまく動作させることができるそうです。}} |
||
=== Mesa === |
=== Mesa === |
||
+ | 以下の [[環境変数]] を使用することで、使用されているドライバーを上書きすることができます。 |
||
− | You can override used driver using the following [[environment variable]]: |
||
MESA_LOADER_DRIVER_OVERRIDE=''driver'' |
MESA_LOADER_DRIVER_OVERRIDE=''driver'' |
||
− | + | デフォルトでは、mesa は {{ic|/lib/dri/}} にあるドライバを検索します。 |
|
$ ls /lib/dri/ |
$ ls /lib/dri/ |
||
+ | {{ic|''driver''}} は {{ic|_dri.so}} を除いたドライバ名です。もし失敗したら、llvmpipe にフォールバックします。 |
||
− | {{ic|''driver''}} is the name of the driver without {{ic|_dri.so}}. If it failed it will fallback to llvmpipe. |
||
+ | また、以下の [[環境変数]] を設定することで、OpenGL ソフトウェアラスタライザードライバを使用することができます。 |
||
− | You can also use OpenGL software rasterizer drivers by setting the following [[environment variables]]: |
||
LIBGL_ALWAYS_SOFTWARE=true |
LIBGL_ALWAYS_SOFTWARE=true |
||
GALLIUM_DRIVER=''driver'' |
GALLIUM_DRIVER=''driver'' |
||
− | {{ic|''driver''}} |
+ | {{ic|''driver''}} は {{ic|softpipe}}, {{ic|llvmpipe}}, {{ic|swr}} のどれか1つです。 |
− | {{Tip| |
+ | {{Tip|これを書いている時点では、llvmpipe と swr は softpipe より高速です。}} |
== OpenGL over Vulkan (Zink) == |
== OpenGL over Vulkan (Zink) == |
||
+ | [https://docs.mesa3d.org/drivers/zink.html Mesa ドキュメント]より: |
||
− | If you experience some issues (a bug in RadeonSI, Iris, etc.), you may try using Zink. |
||
+ | |||
+ | Zink ドライバーは、特定の GPU アーキテクチャをターゲットとするのではなく、Vulkan API 呼び出しを発行する Gallium ドライバです。これを使用すると、Vulkan のみをサポートするデバイスでも完全なデスクトップ OpenGL サポートを得ることができます。 |
||
+ | デフォルトの OpenGL ドライバ (RadeonSI や Iris など) に問題がある場合は、Zink ドライバーを試すことができます。 |
||
− | On AMD RX 6700 XT the FPS is 58-105% depending on a game compared to RadeonSI according to [https://www.phoronix.com/scan.php?page=article&item=zink-ends-2021&num=1]. |
||
+ | [https://www.phoronix.com/review/radeon-zink-summer23 この Phoronix ベンチマーク]によると、一部のアプリケーションでは RadeonSI と比較して平均 FPS が低下する可能性があります。 |
||
− | As of 2021-11-30, many applications do not work on NVIDIA GPUs even with the latest driver 495.44 and {{AUR|mesa-git}}'s master branch. When paired with Copper DRI extension (not yet upstreamed), the average FPS in Tomb Raider is 20% higher on a RTX 2070. |
||
+ | NVIDIA ドライバで Zink を使用するには、以下のコマンドまたは類似のコマンドを実行してください: |
||
− | $ env __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink %app% |
||
+ | $ env __GLX_VENDOR_LIBRARY_NAME=mesa __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink ''application'' |
||
− | == Development == |
||
+ | == 開発 == |
||
− | {{Note|This section is for developers who wants to use OpenGL. End users do not need any thing from this section.}} |
||
− | Using OpenGL in code requires functions loader, read more at [https://www.khronos.org/opengl/wiki/OpenGL_Loading_Library Khronos]. |
||
+ | {{Note|このセクションは、OpenGL を使いたい開発者のためのものです。エンドユーザはこのセクションの内容は必要ありません。}} |
||
− | {{Expansion|Put list of packages relevant to OpenGL and in Arch repo}} |
||
+ | OpenGL をコードで使うには、関数ローダーが必要です。詳しくは、[https://www.khronos.org/opengl/wiki/OpenGL_Loading_Library Khronos] を参照してください。 |
||
− | === OpenGL |
+ | === OpenGL ハードウェアデータベース === |
+ | [https://www.gpuinfo.org/ GPUInfo] は、ユーザーが報告した GPU とドライバの組み合わせ、サポートされている拡張機能、機能などの情報を提供します。 この情報は、特定のハードウェアが OpenGL および Vulkan の両方で互換性や準拠性を満たしているかを確認するのに役立ちます。 |
||
− | [https://www.gpuinfo.org/ GPUInfo] provides user reported GPU/driver combinations, supported extensions, capabilities, etc. |
2025年3月18日 (火) 09:41時点における最新版
wikipedia OpenGL から:
- OpenGL (Open Graphics Library) は、グラフィックスハードウェア向けの2次元/3次元コンピュータグラフィックスライブラリである。SGI 社内で自社の CG ワークステーション向けにクローズドに策定された API 仕様が改良されて公開されています。
詳しくは、Khronos をご覧ください。
OpenGL の開発は 2017 年に終了し、より新しいハードウェアで高いパフォーマンスを提供する "次世代" API である Vulkan に移行しました。
インストール
OpenGL を使用するアプリケーションを実行するには、ハードウェア (GPU または CPU) に適したドライバをインストールする必要があります。
Mesa は、最新の OpenGL 仕様をサポートするオープンソースの OpenGL 実装です。Intel、AMD (旧 ATI)、NVIDIA の GPU 向けのオープンソースドライバを提供し、ソフトウェア ラスタライザ(llvmpipe など)も備えています。
Mesa には 2 つのパッケージがあり、それぞれ異なるドライバを含んでいます。
- mesa は、最新のハードウェア向けの Mesa パッケージで、以下のようなモダンなドライバーを含みます。
r300
: AMD Radeon R300、R400、R500 GPU 向け。r600
: AMD Radeon R600 から Northern Islands までの GPU 向け (AMD 公式サポート)radeonsi
: AMD Southern Island 以降の GPU 向け (AMD 公式サポート)nouveau
: NVIDIA 向けオープンソースドライバー Nouveauvirtio_gpu
: QEMU ベースの VMM (KVM や Xen など) 向けの仮想 GPU ドライバ。vmwgfx
: VMware の仮想 GPU 向け。i915
: Intel Gen 3 GPU 向け。crocus
: Intel Gen 4 Gen 7 GPU 向け。iris
: Intel Gen 8 以降の GPU 向け (Intel 公式サポート)zink
: Vulkan 上で OpenGL を実行するための Gallium ドライバー。d3d12
: WSL など、D3D12 のみをサポートするデバイス向けの OpenGL 3.3 ドライバー。swrast
: レガシーなソフトウェアラスタライザ。Mesa 22.0.0 で廃止されたが、ソースコードには残存 (ArchLinux では 24.1.1 で依然利用可能[1])softpipe
: ソフトウェアラスタライザかつ Gallium のリファレンスドライバ。llvmpipe
: LLVM を使用した x86 JIT コード生成によるマルチスレッド対応のソフトウェアラスタライザ。
- mesa-amber は、古いハードウェア向けのクラシック(Gallium3D 非対応)ドライバーを含むパッケージです。
i830
: Intel Gen 2 GPU 向け(i965
と同じバイナリ)i915
: Intel Gen 3 GPU 向け(i965
と同じバイナリ)i965
: Intel Gen 4 Gen 11 GPU 向け(Intel 公式サポート)radeon
: AMD Radeon R100 GPU 向け(r200
と同じバイナリ)r200
: AMD Radeon R200 GPU 向け。nouveau_vieux
: NVIDIA NV04(Fahrenheit)NV20(Kelvin)GPU 向け。swrast
: レガシーなソフトウェアラスタライザ。
- nvidia-utils : NVIDIA GPU 向けのプロプライエタリ (独自) ドライバ (OpenGL 実装を含む)
- amdgpu-pro-oglpAUR : AMD GPU 向けの プロプライエタリドライバ
検証
OpenGL のインストールを確認するには、mesa-utils の eglinfo
を使用できます。実行すると、環境に応じた異なる値を含む以下のような出力が表示されるはずです。
$ eglinfo -B
Wayland platform: EGL API version: 1.4 EGL vendor string: Mesa Project EGL version string: 1.4 EGL client APIs: OpenGL OpenGL_ES OpenGL compatibility profile vendor: Mesa Project OpenGL compatibility profile renderer: i915 (chipset: Pineview M) OpenGL compatibility profile version: 2.1 Mesa 23.1.5 OpenGL compatibility profile shading language version: 1.20 OpenGL ES profile vendor: Mesa Project OpenGL ES profile renderer: i915 (chipset: Pineview M) OpenGL ES profile version: OpenGL ES 2.0 Mesa 23.1.5 OpenGL ES profile shading language version: OpenGL ES GLSL ES 1.0.16 X11 platform: EGL API version: 1.5 EGL vendor string: Mesa Project EGL version string: 1.5 EGL client APIs: OpenGL OpenGL_ES OpenGL core profile vendor: Mesa OpenGL core profile renderer: llvmpipe (LLVM 15.0.7, 128 bits) OpenGL core profile version: 4.5 (Core Profile) Mesa 23.1.5 OpenGL core profile shading language version: 4.50 OpenGL compatibility profile vendor: Mesa OpenGL compatibility profile renderer: llvmpipe (LLVM 15.0.7, 128 bits) OpenGL compatibility profile version: 4.5 (Compatibility Profile) Mesa 23.1.5 OpenGL compatibility profile shading language version: 4.50 OpenGL ES profile vendor: Mesa OpenGL ES profile renderer: llvmpipe (LLVM 15.0.7, 128 bits) OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.1.5 OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20
X11プラットフォームでは、glxinfo
も使用できます。
同じパッケージには、基本的な OpenGL テストとして eglgears_x11
や glxgears
(X11上)、または eglgears_wayland
(Wayland 上)を使用することもできます。プログラムを実行すると、3つの回転するギアが表示されるはずです。
ドライバの切り替え
ハイブリッドグラフィック については、PRIME を見て下さい。
Mesa
以下の 環境変数 を使用することで、使用されているドライバーを上書きすることができます。
MESA_LOADER_DRIVER_OVERRIDE=driver
デフォルトでは、mesa は /lib/dri/
にあるドライバを検索します。
$ ls /lib/dri/
driver
は _dri.so
を除いたドライバ名です。もし失敗したら、llvmpipe にフォールバックします。
また、以下の 環境変数 を設定することで、OpenGL ソフトウェアラスタライザードライバを使用することができます。
LIBGL_ALWAYS_SOFTWARE=true GALLIUM_DRIVER=driver
driver
は softpipe
, llvmpipe
, swr
のどれか1つです。
OpenGL over Vulkan (Zink)
Mesa ドキュメントより:
Zink ドライバーは、特定の GPU アーキテクチャをターゲットとするのではなく、Vulkan API 呼び出しを発行する Gallium ドライバです。これを使用すると、Vulkan のみをサポートするデバイスでも完全なデスクトップ OpenGL サポートを得ることができます。
デフォルトの OpenGL ドライバ (RadeonSI や Iris など) に問題がある場合は、Zink ドライバーを試すことができます。
この Phoronix ベンチマークによると、一部のアプリケーションでは RadeonSI と比較して平均 FPS が低下する可能性があります。
NVIDIA ドライバで Zink を使用するには、以下のコマンドまたは類似のコマンドを実行してください:
$ env __GLX_VENDOR_LIBRARY_NAME=mesa __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink application
開発
OpenGL をコードで使うには、関数ローダーが必要です。詳しくは、Khronos を参照してください。
OpenGL ハードウェアデータベース
GPUInfo は、ユーザーが報告した GPU とドライバの組み合わせ、サポートされている拡張機能、機能などの情報を提供します。 この情報は、特定のハードウェアが OpenGL および Vulkan の両方で互換性や準拠性を満たしているかを確認するのに役立ちます。