~eliasnaur/gio

gio/app/internal/egl/egl_unix.go -rw-r--r-- 2.7 KiB
app/internal/window,app/internal/egl: replace deprecated MESA_EGL_NO_X11_HEADERS

Fixes gio#147

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/egl: use nilEGLConfig to guard against int vs pointer-typed EGLConfig

Updates #121

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal: fix Android build

pkg-config doesn't exist for Android.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal: use pkg-config for finding system headers and libraries

I've resisted relying on pkg-config in the hope that hard-coded include and
library paths would suffice. However, apart from having to work around some
distro-specific differences, building with hardcoded include paths fails when
building on a buildroot:

	x86_64-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include/wayland'

(see #91)

Andri mentions a workaround (prefixing paths with "="), but that doesn't seem
to work on the BSDs.

Let's see how pkg-config fares. It's an extra dependency, but it promises to keep
us isolated from the varying paths on Linux distrobutions.

Updates #91

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/window,app/internal/egl: avoid X11 dependency in EGL

EGL is window system agnostic, but its egl.h header includex X11
headers by default. Use the MESA_EGL_NO_X11_HEADERS define to avoid
it, fixing the "nox11" build for systems without X11 headers installed.

Fixes #91

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app: Enable building on OpenBSD

Currently the golang.org/x/sys package is missing the Pipe2 call for OpenBSD.
The call exists on OpenBSD, it just isn't exposed.

This diff was tested buy adding the Pipe2 call and setting:

   go mod edit -replace=golang.org/x/sys=/pat/to/modified/sys

Signed-off-by: Aaron Bieber <aaron@bolddaemon.com>
app/internal/egl: don't exit if EGL dlls fails to load

We want a useful error instead of a hard exit for headless windows.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/egl: move EGL interface to its own package

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal: add FreeBSD support

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/window: x11 driver

This driver still lacks fling support and dp/sp configuration.

By default, linux builds will try to use the Wayland driver then
fallback to X11 if it fails. Drivers can be disabled by using either the
nowayland or nox11 build tags.

Signed-off-by: Denis Bernard <db047h@gmail.com>
app/internal/window: work around missing MESA_EGL_NO_X11_HEADERS support

Some versions of eglplatform.h don't support the MESA_EGL_NO_X11_HEADER
define for cross-platform definitions of the EGL types. Remove the
define and use an explicit cast instead.

Fixes gio#46

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app,internal/window: extract native window code to separate package

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app: (linux,android) merge EGLNative* types and functions

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: rename the gioui.org/ui module to gioui.org

The "ui" is redundant and stutters.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui/app: make opengl objects structs

WebGL use opaque values for object handles, not integers. To ensure
portability, wrap handle types with a struct.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: initial import

Signed-off-by: Elias Naur <mail@eliasnaur.com>