diff options
author | Jamie Gennis <jgennis@google.com> | 2011-02-23 13:33:46 -0800 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2011-02-25 13:34:06 -0800 |
commit | 858873271250e80a704c29c71ff0578a87bd9d31 (patch) | |
tree | cfaa270f091efef35262b3085d1f8ca4d08cf588 | |
parent | 30b1fe07a73d522e97b7140cc227232a0c8c1a1e (diff) | |
download | frameworks_base-858873271250e80a704c29c71ff0578a87bd9d31.zip frameworks_base-858873271250e80a704c29c71ff0578a87bd9d31.tar.gz frameworks_base-858873271250e80a704c29c71ff0578a87bd9d31.tar.bz2 |
Expand on the SurfaceTexture API docs.
This change adds additional documentation explaining how a
SurfaceTexture should be used in OpenGL ES. It describes some of the
limitations of using the GL_TEXTURE_EXTERNAL_OES texture target.
Change-Id: I7424c1b422e4f402e87372e8b361391fbec82c5c
-rw-r--r-- | graphics/java/android/graphics/SurfaceTexture.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/SurfaceTexture.java b/graphics/java/android/graphics/SurfaceTexture.java index 2d23fe9..970b207 100644 --- a/graphics/java/android/graphics/SurfaceTexture.java +++ b/graphics/java/android/graphics/SurfaceTexture.java @@ -45,7 +45,13 @@ import android.os.Message; * be done by transforming (1, 1, 0, 1). * * <p>The texture object uses the GL_TEXTURE_EXTERNAL_OES texture target, which is defined by the - * OES_EGL_image_external OpenGL ES extension. This limits how the texture may be used. + * <a href="http://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txt"> + * GL_OES_EGL_image_external</a> OpenGL ES extension. This limits how the texture may be used. + * Each time the texture is bound it must be bound to the GL_TEXTURE_EXTERNAL_OES target rather than + * the GL_TEXTURE_2D target. Additionally, any OpenGL ES 2.0 shader that samples from the texture + * must declare its use of this extension using, for example, an "#extension + * GL_OES_EGL_image_external : require" directive. Such shaders must also access the texture using + * the samplerExternalOES GLSL sampler type. * * <p>SurfaceTexture objects may be created on any thread. {@link #updateTexImage} may only be * called on the thread with the OpenGL ES context that contains the texture object. The |