#!@TERMUX_PREFIX@/bin/sh

_additional_ld_lib_path=""

case "$1" in
	--angle-gl)
		_additional_ld_lib_path="@TERMUX_PREFIX@/opt/angle-android/gl"
	;;
	--angle-vulkan)
		_additional_ld_lib_path="@TERMUX_PREFIX@/opt/angle-android/vulkan"
	;;
	--angle-vulkan-null)
		_additional_ld_lib_path="@TERMUX_PREFIX@/opt/angle-android/vulkan-null"
	;;
esac

if [ x"$_additional_ld_lib_path" != x"" ]; then
	export LD_LIBRARY_PATH="$_additional_ld_lib_path:$LD_LIBRARY_PATH"
	export EPOXY_USE_ANGLE=1
fi

exec @TERMUX_PREFIX@/opt/virglrenderer-android/bin/virgl_test_server
