Documentation ¶
Overview ¶
This program demonstrates the use of a custom OpenGL ES context with app.Window. It is similar to the GLFW example, but uses Gio's window implementation instead of the one in GLFW.
The example runs on Linux using the normal EGL and X11 libraries, so no additional libraries need to be installed. However, it must be build with -tags nowayland until app.ViewEvent is implemented for Wayland.
The example runs on macOS and Windows using ANGLE:
$ CGO_CFLAGS=-I<path-to-ANGLE>/include CGO_LDFLAGS=-L<path-to-angle-libraries> go build -o opengl.exe ./opengl
You'll need the ANGLE libraries (EGL and GLESv2) in your library search path. On macOS:
$ DYLD_LIBRARY_PATH=<path-to-ANGLE-libraries> ./opengl.exe