mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
added gles3 impl
This commit is contained in:
parent
00c96e3ac0
commit
78bffc2df5
21 changed files with 190 additions and 25 deletions
|
|
@ -14,7 +14,7 @@ endif
|
|||
if not features.get('xwayland')
|
||||
exclude_files += 'xwayland.h'
|
||||
endif
|
||||
if not features.get('gles2-renderer')
|
||||
if not features.get('gles2-renderer') and not features.get('gles3-renderer')
|
||||
exclude_files += ['render/egl.h', 'render/gles.h']
|
||||
endif
|
||||
if not features.get('vulkan-renderer')
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ struct wlr_egl {
|
|||
bool has_modifiers;
|
||||
struct wlr_drm_format_set dmabuf_texture_formats;
|
||||
struct wlr_drm_format_set dmabuf_render_formats;
|
||||
enum egl_version version;
|
||||
};
|
||||
|
||||
struct wlr_egl_context {
|
||||
|
|
@ -61,7 +62,7 @@ struct wlr_egl_context {
|
|||
*
|
||||
* Will attempt to load all possibly required API functions.
|
||||
*/
|
||||
struct wlr_egl *wlr_egl_create_with_drm_fd(int drm_fd);
|
||||
struct wlr_egl *wlr_egl_create_with_drm_fd(int drm_fd, enum egl_version version);
|
||||
|
||||
/**
|
||||
* Frees all related EGL resources, makes the context not-current and
|
||||
|
|
|
|||
|
|
@ -30,6 +30,13 @@
|
|||
* Required for <wlr/render/gles.h>.
|
||||
*/
|
||||
#mesondefine WLR_HAS_GLES2_RENDERER
|
||||
/**
|
||||
* Whether the GLES3 renderer is compile-time enabled. Equivalent to the
|
||||
* pkg-config "have_gles3_renderer" variable.
|
||||
*
|
||||
* Required for <wlr/render/gles.h>.
|
||||
*/
|
||||
#mesondefine WLR_HAS_GLES3_RENDERER
|
||||
/**
|
||||
* Whether the Vulkan renderer is compile-time enabled. Equivalent to the
|
||||
* pkg-config "have_vulkan_renderer" variable.
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
struct wlr_egl;
|
||||
|
||||
enum egl_version { GLES2 = 2, GLES3 = 3 };
|
||||
|
||||
/**
|
||||
* Create a struct wlr_egl with an existing EGL display and context.
|
||||
*
|
||||
|
|
@ -35,7 +37,7 @@ struct wlr_egl;
|
|||
* initialization.
|
||||
*/
|
||||
struct wlr_egl *wlr_egl_create_with_context(EGLDisplay display,
|
||||
EGLContext context);
|
||||
EGLContext context, enum egl_version version);
|
||||
|
||||
/**
|
||||
* Get the EGL display used by the struct wlr_egl.
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
struct wlr_egl;
|
||||
|
||||
enum egl_version;
|
||||
|
||||
/**
|
||||
* OpenGL ES renderer.
|
||||
*
|
||||
|
|
@ -28,7 +30,8 @@ struct wlr_egl;
|
|||
* render pass can't be used before the nested render pass is submitted.
|
||||
*/
|
||||
|
||||
struct wlr_renderer *wlr_gles_renderer_create_with_drm_fd(int drm_fd);
|
||||
struct wlr_renderer *wlr_gles_renderer_create_with_drm_fd(int drm_fd,
|
||||
enum egl_version version);
|
||||
struct wlr_renderer *wlr_gles_renderer_create(struct wlr_egl *egl);
|
||||
|
||||
struct wlr_egl *wlr_gles_renderer_get_egl(struct wlr_renderer *renderer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue