gl: add a comment for linux installation
OpenGL ES is not installed by default on linux distributions, which
can lead to a cryptic error. Add a comment after the #include
mentioning what packages contain OpenGL ES on Ubuntu, which is
helpfully printed in the error message. For example:
$ go build golang.org/x/mobile/example/basic
# golang.org/x/mobile/gl
In file included from ../../mobile/gl/work.go:21:0:
work.h:6:117: fatal error: GLES2/gl2.h: No such file or directory
#include <GLES2/gl2.h> // install on Ubuntu with: sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev libx11-dev
Change-Id: Ia7ba583cee4dfdeed408f582b29da90de9a4fab3
Reviewed-on: https://go-review.googlesource.com/18058
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/app/x11.go b/app/x11.go
index e62dc14..d6fe7b2 100644
--- a/app/x11.go
+++ b/app/x11.go
@@ -10,9 +10,6 @@
Simple on-screen app debugging for X11. Not an officially supported
development target for apps, as screens with mice are very different
than screens with touch panels.
-
-On Ubuntu 14.04 'Trusty', you may have to install these libraries:
-sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev libx11-dev
*/
/*
diff --git a/gl/work.h b/gl/work.h
index 0a7e40c..1a090f3 100644
--- a/gl/work.h
+++ b/gl/work.h
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
#ifdef os_linux
-#include <GLES2/gl2.h>
+#include <GLES2/gl2.h> // install on Ubuntu with: sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev libx11-dev
#endif
#ifdef os_ios
#include <OpenGLES/ES2/glext.h>