mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-10-30 07:30:46 +00:00
render/egl: add wlr_egl_get_{context,display}
This allows compositors to integrate with the wlroots GLES2 renderer, if they need to perform custom GL rendering.
This commit is contained in:
parent
4b77eadf06
commit
452a8ec940
@ -70,6 +70,22 @@ struct wlr_egl {
|
||||
struct wlr_egl *wlr_egl_create_with_context(EGLDisplay display,
|
||||
EGLContext context);
|
||||
|
||||
/**
|
||||
* Get the EGL display used by the struct wlr_egl.
|
||||
*
|
||||
* This is typically used by compositors which need to perform custom OpenGL
|
||||
* operations.
|
||||
*/
|
||||
EGLDisplay wlr_egl_get_display(struct wlr_egl *egl);
|
||||
|
||||
/**
|
||||
* Get the EGL context used by the struct wlr_egl.
|
||||
*
|
||||
* This is typically used by compositors which need to perform custom OpenGL
|
||||
* operations.
|
||||
*/
|
||||
EGLContext wlr_egl_get_context(struct wlr_egl *egl);
|
||||
|
||||
/**
|
||||
* Make the EGL context current.
|
||||
*
|
||||
|
@ -583,6 +583,14 @@ void wlr_egl_destroy(struct wlr_egl *egl) {
|
||||
free(egl);
|
||||
}
|
||||
|
||||
EGLDisplay wlr_egl_get_display(struct wlr_egl *egl) {
|
||||
return egl->display;
|
||||
}
|
||||
|
||||
EGLContext wlr_egl_get_context(struct wlr_egl *egl) {
|
||||
return egl->context;
|
||||
}
|
||||
|
||||
bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImage image) {
|
||||
if (!egl->exts.KHR_image_base) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user