hxn

Display

An EGL display: the connection contexts are made on.

Static methods

function hxnAdopt(hxnRaw:Handle):Display

An object for a value the library returned.

function headless():Display

A display that needs no window system: Mesa's surfaceless platform where EGL has it, else the default display.

function native(platform:Int, native:Int64):Display

The display of a window system: platform is an EGL platform, such as EGL_PLATFORM_X11_KHR (0x31D5) or EGL_PLATFORM_WAYLAND_KHR (0x31D8), and native that platform's display, which hxn-window's raw gives. Platform 0 takes native as an EGLNativeDisplayType, and 0 there is the default display.

Properties

var hxnRaw:Handle

Methods

function vendor():String

EGL's vendor string.

function version():String

EGL's version string.

function extensions():String

The display's EGL extensions, separated by spaces.

function createContext():Context

An OpenGL ES 3 context with no default framebuffer: it renders into framebuffers alone. It is current on the calling thread.

function createWindowContext(window:Int64, visual:Int):Context

An OpenGL ES 3 context whose default framebuffer is the window window, an EGLNativeWindowType: an ANativeWindow* on Android, an X11 window on Xlib. visual is the window's X11 visual id, which picks a config of that visual; 0 takes any. With hxn-window on Xlib they are raw(0) and raw(1). It is current on the calling thread.

function createWaylandContext(surface:Int64, width:Int, height:Int):Context

A context whose default framebuffer is a Wayland window: surface is its wl_surface, which hxn-window's raw(0) gives, on a display from native(0x31D8, raw(2)) (EGL_PLATFORM_WAYLAND_KHR). Context.resizeWindow follows the window's size.

function close():Void

Releases the native value now. The collector does it otherwise. Using this object afterwards throws.