diff options
author | Dave Airlie <airlied@redhat.com> | 2015-03-03 11:16:44 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-03-03 11:16:44 +1000 |
commit | 4e503f95da971eba416dc5a426d37d2d6e270623 (patch) | |
tree | 45e1e2b1f68a4c626b180c698956e9c5303775c5 | |
parent | 5456328706afaca50e9032f33e46a3997425c79a (diff) |
use texture external OES
-rw-r--r-- | client.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -33,9 +33,9 @@ const char *vertex_src = const char *fragment_src = - " \ + "#extension GL_OES_EGL_image_external : require \n \ varying highp vec2 tcoords; \ - uniform sampler2D samp; \ + uniform samplerExternalOES samp; \ \ void main() \ { \ @@ -387,13 +387,13 @@ void add_texture(struct client *client, struct cmd_buf *cbuf, int fd) error(1, errno, "failed to import image dma-buf"); glGenTextures(1, &texture->local_id); - glBindTexture(GL_TEXTURE_2D, texture->local_id); - glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); + glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture->local_id); + //glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); + //glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); // glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 640, 480, 0, // GL_RGBA, GL_UNSIGNED_BYTE, NULL); - glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)texture->image); + glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, (GLeglImageOES)texture->image); if (!client->texhead) client->texhead = texture; |