mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 00:50:42 -05:00
cogl/texture-2d-gl: Bind correct target when getting data
While for normal textures, GL_TEXTURE_2D should be used, when it's an external texture, binding it using GL_TEXTURE_2D results in an error. Reading the specification for GL_TEXTURE_EXTERNAL_OES it is unclear whether getting pixel data from a texture is possible, and tests show it doesn't result in any data, but in case it would eventually start working, at least bind the correct target for now. https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
This commit is contained in:
parent
29e7a69729
commit
6dc7bacf08
@ -859,12 +859,12 @@ _cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
|
||||
width,
|
||||
bpp);
|
||||
|
||||
_cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
|
||||
_cogl_bind_gl_texture_transient (tex_2d->gl_target,
|
||||
tex_2d->gl_texture,
|
||||
tex_2d->is_foreign);
|
||||
|
||||
ctx->texture_driver->gl_get_tex_image (ctx,
|
||||
GL_TEXTURE_2D,
|
||||
tex_2d->gl_target,
|
||||
gl_format,
|
||||
gl_type,
|
||||
data);
|
||||
|
Loading…
Reference in New Issue
Block a user