Documentation for <wlr/render/egl.h>

Back to index

Table of contents

struct wlr_egl

struct wlr_egl {
	EGLDisplay display;
	EGLContext context;
	EGLDeviceEXT device;
	struct gbm_device *gbm_device;
	struct {
		bool KHR_image_base;
		bool EXT_image_dma_buf_import;
		bool EXT_image_dma_buf_import_modifiers;
		bool IMG_context_priority;
		bool EXT_device_drm;
		bool EXT_device_drm_render_node;
		bool EXT_device_query;
		bool KHR_platform_gbm;
		bool EXT_platform_device;
	} exts;
	struct {
		PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT;
		PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
		PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR;
		PFNEGLQUERYWAYLANDBUFFERWLPROC eglQueryWaylandBufferWL;
		PFNEGLQUERYDMABUFFORMATSEXTPROC eglQueryDmaBufFormatsEXT;
		PFNEGLQUERYDMABUFMODIFIERSEXTPROC eglQueryDmaBufModifiersEXT;
		PFNEGLDEBUGMESSAGECONTROLKHRPROC eglDebugMessageControlKHR;
		PFNEGLQUERYDISPLAYATTRIBEXTPROC eglQueryDisplayAttribEXT;
		PFNEGLQUERYDEVICESTRINGEXTPROC eglQueryDeviceStringEXT;
		PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT;
	} procs;
	bool has_modifiers;
	struct wlr_drm_format_set dmabuf_texture_formats;
	struct wlr_drm_format_set dmabuf_render_formats;
};

wlr_egl_create_with_context()

struct wlr_egl *wlr_egl_create_with_context(​EGLDisplay display, EGLContext context);

wlr_egl_is_current()

bool wlr_egl_is_current(​struct wlr_egl *egl);

wlr_egl_make_current()

bool wlr_egl_make_current(​struct wlr_egl *egl);

Make the EGL context current.

Callers are expected to clear the current context when they are done by calling wlr_egl_unset_current().

wlr_egl_unset_current()

bool wlr_egl_unset_current(​struct wlr_egl *egl);