mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-06 04:06:11 -05:00
render/gles2: export gl fromat on texture attribs
When importing a wlr_texture as an external resource into Qt, Qt needs to know its pixel format. This is similar to the usage scenario of the format field in wlr_vk_image_attribs. Although it is possible to query GL_TEXTURE_INTERNAL_FORMAT through the OpenGL API, it is not the same value as the format that was originally passed to OpenGL when the wlr_texture was created. The internal_format and format do not have a one-to-one correspondence, and the correct original format cannot be retrieved from outside.
This commit is contained in:
parent
4477ca7d32
commit
834b00a1ce
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue