From e8cbb157badef11e577fecc3e3fe95a918b72d18 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Thu, 29 Jan 2015 11:03:03 -0700 Subject: Allow use of OpenGL ES 2 on Desktop platforms with -tags=gles2 This allows for the explicitly choosing to use the OpenGL ES 2 client instead of the standard OpenGL client on Desktop (386, amd64) platforms. To explicitly choose the OpenGL ES 2 client, use the build tag "gles2". --- build.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build.go b/build.go index 3131cd3..cc0e224 100644 --- a/build.go +++ b/build.go @@ -1,12 +1,13 @@ package glfw3 /* -// Choose OpenGL client on 386 and amd64. -#cgo 386 CFLAGS: -D_GLFW_USE_OPENGL -#cgo amd64 CFLAGS: -D_GLFW_USE_OPENGL +// Standard OpenGL client is used on 386 and amd64 architectures, except when +// explicitly asked for gles2 or wayland. +#cgo 386,!gles2,!wayland CFLAGS: -D_GLFW_USE_OPENGL +#cgo amd64,!gles2,!wayland CFLAGS: -D_GLFW_USE_OPENGL -// Choose OpenGL ES V2 on arm. -#cgo arm CFLAGS: -D_GLFW_USE_GLESV2 +// Choose OpenGL ES V2 on arm, or when explicitly asked for gles2/wayland. +#cgo arm gles2 wayland CFLAGS: -D_GLFW_USE_GLESV2 // Windows Build Tags -- cgit v1.2.3