diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/render/gles2.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/include/render/gles2.h b/include/render/gles2.h index 15653cac..7a629d69 100644 --- a/include/render/gles2.h +++ b/include/render/gles2.h @@ -60,31 +60,24 @@ struct wlr_gles2_renderer { uint32_t viewport_width, viewport_height; }; -enum wlr_gles2_texture_type { - WLR_GLES2_TEXTURE_GLTEX, - WLR_GLES2_TEXTURE_WL_DRM_GL, - WLR_GLES2_TEXTURE_WL_DRM_EXT, - WLR_GLES2_TEXTURE_DMABUF, -}; - struct wlr_gles2_texture { struct wlr_texture wlr_texture; - struct wlr_egl *egl; - enum wlr_gles2_texture_type type; - int width, height; - bool has_alpha; - enum wl_shm_format wl_format; // used to interpret upload data - bool inverted_y; - // Not set if WLR_GLES2_TEXTURE_GLTEX + // Basically: + // GL_TEXTURE_2D == mutable + // GL_TEXTURE_EXTERNAL_OES == immutable + GLenum target; + GLuint tex; + EGLImageKHR image; - GLuint image_tex; - union { - GLuint gl_tex; - struct wl_resource *wl_drm; - }; + int width, height; + bool inverted_y; + bool has_alpha; + + // Only affects target == GL_TEXTURE_2D + enum wl_shm_format wl_format; // used to interpret upload data }; const struct wlr_gles2_pixel_format *get_gles2_format_from_wl( |