gl01/internal/render/gpu_preference/linux_nvidia.go
2022-01-20 21:58:50 +08:00

16 lines
216 B
Go

//+build nvidia
package gpu_preference
import (
"os"
"runtime"
)
func init() {
if runtime.GOOS == "linux" {
os.Setenv("__NV_PRIME_RENDER_OFFLOAD", "1")
os.Setenv("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
}
}