From 0c87f16817ff0bf1f05e0d634944fd47b097faee Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sun, 23 Oct 2011 18:52:38 +0800 Subject: mesa: add support for GL_OES_EGL_image_external This is an OpenGL ES specific extension. External textures are textures that may be sampled from, but not be updated (no glTexSubImage* and etc.). The image data are taken from an EGLImage. Reviewed-by: Brian Paul Acked-by: Jakob Bornecrantz --- src/mesa/main/enable.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mesa/main/enable.c') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 689dc8a99ec..b2c77243b50 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -916,6 +916,14 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->Color.sRGBEnabled = state; break; + /* GL_OES_EGL_image_external */ + case GL_TEXTURE_EXTERNAL_OES: + CHECK_EXTENSION(OES_EGL_image_external, cap); + if (!enable_texture(ctx, state, TEXTURE_EXTERNAL_BIT)) { + return; + } + break; + default: goto invalid_enum_error; } @@ -1417,6 +1425,11 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION(EXT_framebuffer_sRGB); return ctx->Color.sRGBEnabled; + /* GL_OES_EGL_image_external */ + case GL_TEXTURE_EXTERNAL_OES: + CHECK_EXTENSION(OES_EGL_image_external); + return is_texture_enabled(ctx, TEXTURE_EXTERNAL_BIT); + default: goto invalid_enum_error; } -- cgit v1.2.3