Install dependecies:
pkg install wget virglrenderer-android virglrenderer angle-android openssl
Install vgl
cd && rm -rf ~/vgl && wget https://github.com/ar37-rs/virgl-angle-termux/releases/download/latest/vgl && chmod +x ~/vgl
(Read for more info to setup xfce4 desktop for native termux-x11)
Make sure to set config before launching your app like so:
~/vgl use-angle
or use virgl android (fix for some gpus unable to use angle-vulkan issue)
~/vgl use-android
and then simply
~/vgl firefox
or
~/vgl any_termux_x11_binary_app
Using angle vulkan null display (default)
~/vgl angle=vulkan-null
Using angle vulkan
~/vgl angle=vulkan
Using angle gl/es
~/vgl angle=gl
Terminate running virgl process
~/vgl q
Update angle-android with the latest build (for android 9+ only)
~/vgl update-angle
If there's some color issues (if not, skip this), to fix virglrenderer-v1.x.x such incorrect color (or too dark) on d3d (Direct X) apps/games use d3d config like so:
~/vgl config=d3d
and then
~/vgl wine any_d3d_games
or
(Read for more info on how install and run wine using xow64_wine + virgl)
to switch back using OpenGL config use command,
~/vgl config=gl
for OpenGL apps/games on wine use OpenGL config as above.
Copy vgl file like so:
cp /data/data/com.termux/files/home/vgl /usr/bin/vgl && chmod +x /usr/bin/vgl
prebuilt vulkan with validation layer (more stable) 13.9 MB:
cd && rm -rf ~/angle-android_2.1.2-latest.deb && wget https://github.com/ar37-rs/virgl-angle-termux/releases/download/latest/angle-android_2.1.2-latest.deb
dpkg -i ~/angle-android_2.1.2-latest.deb
or minimal version (for android 7+) without vulkan validation layer 2.9 MB:
cd && rm -rf ~/angle-android_2.1.24570_minimal.deb && wget https://github.com/ar37-rs/virgl-angle-termux/releases/download/latest/angle-android_2.1.24570_minimal.deb
dpkg -i ~/angle-android_2.1.24570_minimal.deb
(recommended for stability);
cd && rm -rf ~/virglrenderer_1.1.0-11_aarch64.deb && wget https://github.com/ar37-rs/virgl-angle-termux/releases/download/latest/virglrenderer_1.1.0-11_aarch64.deb
dpkg -i ~/virglrenderer_1.1.0-11_aarch64.deb
Using virglrenderer-1.1.0 with patched direct xcb connection (unstable and not recommended, android 8+ only)
still very buggy (can be used with specific patched mesa virpipe driver):
cd && rm -rf ~/virglrenderer_1.1.0-11_aarch64-patched.deb && wget https://github.com/ar37-rs/virgl-angle-termux/releases/download/latest/virglrenderer_1.1.0-11_aarch64-patched.deb
dpkg -i ~/virglrenderer_1.1.0-11_aarch64-patched.deb
and then repeat usage above.
https://github.com/termux/termux-packages/tree/master/packages/angle-android
Twaik Yont, Termux Team and Maintainers and many other contributors for making termux things happen.