SurfaceTexture.DetachFromGLContext Method

Definition

Detach the SurfaceTexture from the OpenGL ES context that owns the OpenGL ES texture object.

[Android.Runtime.Register("detachFromGLContext", "()V", "GetDetachFromGLContextHandler")]
public virtual void DetachFromGLContext ();
[<Android.Runtime.Register("detachFromGLContext", "()V", "GetDetachFromGLContextHandler")>]
abstract member DetachFromGLContext : unit -> unit
override this.DetachFromGLContext : unit -> unit
Attributes

Remarks

Detach the SurfaceTexture from the OpenGL ES context that owns the OpenGL ES texture object. This call must be made with the OpenGL ES context current on the calling thread. The OpenGL ES texture object will be deleted as a result of this call. After calling this method all calls to #updateTexImage will throw an java.lang.IllegalStateException until a successful call to #attachToGLContext is made.

This can be used to access the SurfaceTexture image contents from multiple OpenGL ES contexts. Note, however, that the image contents are only accessible from one OpenGL ES context at a time.

Java documentation for android.graphics.SurfaceTexture.detachFromGLContext().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to