opengl

command
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2024 License: MIT, Unlicense Imports: 22 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL