~eliasnaur/gio-example

129cc07e318a7adbcea9e3b850423aab13ba5a62 — Chris Waldon 8 months ago ffa3520
opengl: prevent building for wayland

Now that Wayland is the default Gio backend on Linux again,
prevent this example from building for it. app.ViewEvent
is not yet implemented on Wayland, making the use of a custom
renderer impossible.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
2 files changed, 9 insertions(+), 3 deletions(-)

M opengl/egl_linux.go
M opengl/main.go
M opengl/egl_linux.go => opengl/egl_linux.go +4 -0
@@ 1,4 1,8 @@
// SPDX-License-Identifier: Unlicense OR MIT

//go:build linux && nowayland
// +build linux,nowayland

package main

import "gioui.org/app"

M opengl/main.go => opengl/main.go +5 -3
@@ 1,14 1,16 @@
// SPDX-License-Identifier: Unlicense OR MIT

//go:build darwin || windows || linux
// +build darwin windows linux
//go:build darwin || windows || (linux && nowayland)
// +build darwin windows linux,nowayland

// 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.
// 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:
//