diff options
author | Chia-I Wu <[email protected]> | 2011-10-23 18:52:38 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2011-11-03 15:09:45 +0800 |
commit | 0c87f16817ff0bf1f05e0d634944fd47b097faee (patch) | |
tree | 35549c03e8f4c41b90a31abf50b068271deff4a2 /src/mesa/main/enable.c | |
parent | 79463f18ac91b2b0f1ed6dcdb26f84b942543d80 (diff) |
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 <[email protected]>
Acked-by: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 13 |
1 files changed, 13 insertions, 0 deletions
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; } |