diff options
author | Vasiliy Ulyanov <v.ulyanov@samsung.com> | 2016-12-23 20:14:20 +0300 |
---|---|---|
committer | Vasiliy Ulyanov <v.ulyanov@samsung.com> | 2016-12-23 20:32:52 +0300 |
commit | 10cbad9bfe346f80c276180f2fd9f844a8b08916 (patch) | |
tree | 3b8870ad79b0c16cf290f5581a05b0316972c5f9 | |
parent | 99c6353c2c18dfb4337a7f990036688b91805617 (diff) | |
download | emulator-yagl-accepted/tizen/common/20161227.192209.tar.gz emulator-yagl-accepted/tizen/common/20161227.192209.tar.bz2 emulator-yagl-accepted/tizen/common/20161227.192209.zip |
Fix wrong host texture bindingsubmit/tizen_unified/20170308.100403submit/tizen/20161226.050229accepted/tizen/wearable/20161226.131557accepted/tizen/unified/20170309.031107accepted/tizen/tv/20161226.131538accepted/tizen/mobile/20161226.131518accepted/tizen/ivi/20161226.131617accepted/tizen/common/20161227.192209accepted/tizen_wearableaccepted/tizen_tvaccepted/tizen_mobileaccepted/tizen_iviaccepted/tizen_common
The call sequence like bellow was causing flickering:
glBindTexture(GL_TEXTURE_EXTERNAL_OES, tex);
glBindTexture(GL_TEXTURE_2D, 0);
glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, img);
Eventually zero texture was used on the host side since external
textures are currently handled as GL_TEXTURE_2D.
Change-Id: I9d8480df7dd5f44f49f31e170de6f478c663f8c3
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
-rw-r--r-- | GLES_common/yagl_gles_texture.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/GLES_common/yagl_gles_texture.c b/GLES_common/yagl_gles_texture.c index ff5f608..19382f4 100644 --- a/GLES_common/yagl_gles_texture.c +++ b/GLES_common/yagl_gles_texture.c @@ -248,8 +248,18 @@ void yagl_gles_texture_set_image(struct yagl_gles_texture *texture, texture->binding = NULL; } + /* + * FIXME We still need to update the host binding when using external + * textures even if that same image is already set. E.g. consider the bellow + * scenario: + * glBindTexture(GL_TEXTURE_EXTERNAL_OES, tex); + * glBindTexture(GL_TEXTURE_2D, 0); + * glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, img); + * External textures are handled as GL_TEXTURE_2D thus the corresponding + * host binding will be zero in this case. + */ if (texture->image == image) { - return; + goto bind; } yagl_gles_image_acquire(image); @@ -263,6 +273,7 @@ void yagl_gles_texture_set_image(struct yagl_gles_texture *texture, texture->global_name = image->tex_global_name; texture->image = image; +bind: yagl_host_glBindTexture(texture->target == GL_TEXTURE_EXTERNAL_OES ? GL_TEXTURE_2D : texture->target, texture->global_name); } |