mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-15 08:22:07 -04:00
Merge branch 'gles2_texture_format' into 'master'
render/gles2: export gl fromat on texture attribs See merge request wlroots/wlroots!5250
This commit is contained in:
commit
d000f3f9e5
3 changed files with 4 additions and 0 deletions
|
|
@ -124,6 +124,7 @@ struct wlr_gles2_texture {
|
|||
// case.
|
||||
GLuint tex;
|
||||
GLuint fbo;
|
||||
GLint format;
|
||||
|
||||
bool has_alpha;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ struct wlr_gles2_texture_attribs {
|
|||
GLuint tex;
|
||||
|
||||
bool has_alpha;
|
||||
GLint format;
|
||||
};
|
||||
|
||||
bool wlr_renderer_is_gles2(const struct wlr_renderer *wlr_renderer);
|
||||
|
|
|
|||
|
|
@ -348,6 +348,7 @@ static struct wlr_texture *gles2_texture_from_pixels(
|
|||
}
|
||||
texture->target = GL_TEXTURE_2D;
|
||||
texture->has_alpha = pixel_format_has_alpha(fmt->drm_format);
|
||||
texture->format = fmt->gl_format;
|
||||
texture->drm_format = fmt->drm_format;
|
||||
|
||||
GLint internal_format = fmt->gl_internalformat;
|
||||
|
|
@ -459,5 +460,6 @@ void wlr_gles2_texture_get_attribs(struct wlr_texture *wlr_texture,
|
|||
.target = texture->target,
|
||||
.tex = texture->tex,
|
||||
.has_alpha = texture->has_alpha,
|
||||
.format = texture->format,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue