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>
This commit is contained in:
David Crawshaw 2015-12-19 17:38:15 -05:00
Родитель 48c96a5e62
Коммит 54b4a066d7
2 изменённых файлов: 1 добавлений и 4 удалений

Просмотреть файл

@ -10,9 +10,6 @@ package app
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
*/
/*

Просмотреть файл

@ -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>