Go to the documentation of this file.
21 #include "../../SDL_internal.h"
23 #if SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL
25 #include "../SDL_sysvideo.h"
26 #include "../../events/SDL_windowevents_c.h"
46 WAYLAND_wl_display_flush(
data->display);
66 struct wl_region *region;
68 if (SDL_EGL_SwapBuffers(
_this,
data->egl_surface) < 0) {
73 if (
data->resize.pending) {
74 if (
data->scale_factor !=
data->resize.scale_factor) {
81 data->scale_factor =
data->resize.scale_factor;
83 WAYLAND_wl_egl_window_resize(
data->egl_window,
window->w *
data->scale_factor,
window->h *
data->scale_factor, 0, 0);
85 if (
data->resize.configure) {
86 if (
data->waylandData->shell.xdg) {
88 }
else if (
data->waylandData->shell.zxdg) {
102 WAYLAND_wl_display_flush(
data->waylandData->display );
int Wayland_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
static void wl_surface_set_opaque_region(struct wl_surface *wl_surface, struct wl_region *region)
int Wayland_GLES_LoadLibrary(_THIS, const char *path)
void Wayland_GLES_GetDrawableSize(_THIS, SDL_Window *window, int *w, int *h)
SDL_GLContext Wayland_GLES_CreateContext(_THIS, SDL_Window *window)
@ SDL_WINDOWEVENT_RESIZED
static void wl_region_add(struct wl_region *wl_region, int32_t x, int32_t y, int32_t width, int32_t height)
int Wayland_GLES_SwapWindow(_THIS, SDL_Window *window)
GLsizei const GLchar *const * path
void Wayland_PumpEvents(_THIS)
static void zxdg_surface_v6_ack_configure(struct zxdg_surface_v6 *zxdg_surface_v6, uint32_t serial)
GLfloat GLfloat GLfloat GLfloat h
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
The type used to identify a window.
void Wayland_GLES_DeleteContext(_THIS, SDL_GLContext context)
static void wl_region_destroy(struct wl_region *wl_region)
static struct wl_region * wl_compositor_create_region(struct wl_compositor *wl_compositor)
static screen_context_t context
static SDL_VideoDevice * _this
EGLSurface EGLNativeWindowType * window
static void xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial)
static void wl_surface_set_buffer_scale(struct wl_surface *wl_surface, int32_t scale)
void * SDL_GLContext
An opaque handle to an OpenGL context.
int SDL_SendWindowEvent(SDL_Window *window, Uint8 windowevent, int data1, int data2)
GLubyte GLubyte GLubyte GLubyte w