SurfaceTexture Constructors

Definition

Overloads

SurfaceTexture(Boolean)

Construct a new SurfaceTexture to stream images to a given OpenGL texture.

SurfaceTexture(Int32)

Construct a new SurfaceTexture to stream images to a given OpenGL texture.

SurfaceTexture(Int32, Boolean)

Construct a new SurfaceTexture to stream images to a given OpenGL texture.

SurfaceTexture(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

SurfaceTexture(Boolean)

Construct a new SurfaceTexture to stream images to a given OpenGL texture.

[Android.Runtime.Register(".ctor", "(Z)V", "", ApiSince=26)]
public SurfaceTexture (bool singleBufferMode);
[<Android.Runtime.Register(".ctor", "(Z)V", "", ApiSince=26)>]
new Android.Graphics.SurfaceTexture : bool -> Android.Graphics.SurfaceTexture

Parameters

singleBufferMode
Boolean

whether the SurfaceTexture will be in single buffered mode.

Attributes

Remarks

Construct a new SurfaceTexture to stream images to a given OpenGL texture.

In single buffered mode the application is responsible for serializing access to the image content buffer. Each time the image content is to be updated, the #releaseTexImage() method must be called before the image content producer takes ownership of the buffer. For example, when producing image content with the NDK ANativeWindow_lock and ANativeWindow_unlockAndPost functions, #releaseTexImage() must be called before each ANativeWindow_lock, or that call will fail. When producing image content with OpenGL ES, #releaseTexImage() must be called before the first OpenGL ES function call each frame.

Unlike #SurfaceTexture(int, boolean), which takes an OpenGL texture object name, this constructor creates the SurfaceTexture in detached mode. A texture name must be passed in using #attachToGLContext before calling #releaseTexImage() and producing image content using OpenGL ES.

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

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

SurfaceTexture(Int32)

Construct a new SurfaceTexture to stream images to a given OpenGL texture.

[Android.Runtime.Register(".ctor", "(I)V", "")]
public SurfaceTexture (int texName);
[<Android.Runtime.Register(".ctor", "(I)V", "")>]
new Android.Graphics.SurfaceTexture : int -> Android.Graphics.SurfaceTexture

Parameters

texName
Int32

the OpenGL texture object name (e.g. generated via glGenTextures)

Attributes

Remarks

Construct a new SurfaceTexture to stream images to a given OpenGL texture.

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

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

SurfaceTexture(Int32, Boolean)

Construct a new SurfaceTexture to stream images to a given OpenGL texture.

[Android.Runtime.Register(".ctor", "(IZ)V", "")]
public SurfaceTexture (int texName, bool singleBufferMode);
[<Android.Runtime.Register(".ctor", "(IZ)V", "")>]
new Android.Graphics.SurfaceTexture : int * bool -> Android.Graphics.SurfaceTexture

Parameters

texName
Int32

the OpenGL texture object name (e.g. generated via glGenTextures)

singleBufferMode
Boolean

whether the SurfaceTexture will be in single buffered mode.

Attributes

Remarks

Construct a new SurfaceTexture to stream images to a given OpenGL texture.

In single buffered mode the application is responsible for serializing access to the image content buffer. Each time the image content is to be updated, the #releaseTexImage() method must be called before the image content producer takes ownership of the buffer. For example, when producing image content with the NDK ANativeWindow_lock and ANativeWindow_unlockAndPost functions, #releaseTexImage() must be called before each ANativeWindow_lock, or that call will fail. When producing image content with OpenGL ES, #releaseTexImage() must be called before the first OpenGL ES function call each frame.

Java documentation for android.graphics.SurfaceTexture.SurfaceTexture(int, boolean).

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

SurfaceTexture(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected SurfaceTexture (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Graphics.SurfaceTexture : nativeint * Android.Runtime.JniHandleOwnership -> Android.Graphics.SurfaceTexture

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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