語言

SurfaceTexture 建構函式

定義

多載

名稱 Description
SurfaceTexture(Boolean)

建立一個新的 SurfaceTexture,將影像串流到指定的 OpenGL 材質。

SurfaceTexture(Int32)

建立一個新的 SurfaceTexture,將影像串流到指定的 OpenGL 材質。

SurfaceTexture(Int32, Boolean)

建立一個新的 SurfaceTexture,將影像串流到指定的 OpenGL 材質。

SurfaceTexture(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

SurfaceTexture(Boolean)

建立一個新的 SurfaceTexture,將影像串流到指定的 OpenGL 材質。

[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

參數

singleBufferMode
Boolean

SurfaceTexture 是否會處於單一緩衝模式。

屬性

備註

建立一個新的 SurfaceTexture,將影像串流到指定的 OpenGL 材質。

在單一緩衝模式下,應用程式負責序列化對影像內容緩衝區的存取。 每次影像內容要更新時,必須先呼叫該 #releaseTexImage() 方法,影像內容製作者才會取得緩衝區的所有權。 例如,當產生帶有 NDK ANativeWindow_lock 和 ANativeWindow_unlockAndPost 函式的影像內容時, #releaseTexImage() 必須在每個ANativeWindow_lock前呼叫,否則該呼叫將失敗。 在使用 OpenGL ES 製作影像內容時, #releaseTexImage() 必須在每個影格呼叫第一個 OpenGL ES 函式前呼叫。

與 #SurfaceTexture(int, boolean)採用 OpenGL 材質物件名稱不同,這個建構子以分離模式建立 SurfaceTexture。 在呼叫#attachToGLContext並產生 OpenGL ES 影像內容前,必須先傳#releaseTexImage()入一個貼圖名稱。

Java 文件 android.graphics.SurfaceTexture.SurfaceTexture(boolean)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

SurfaceTexture(Int32)

建立一個新的 SurfaceTexture,將影像串流到指定的 OpenGL 材質。

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

參數

texName
Int32

OpenGL 材質物件名稱(例如透過 glGenTextures 產生)

屬性

備註

建立一個新的 SurfaceTexture,將影像串流到指定的 OpenGL 材質。

Java 文件 android.graphics.SurfaceTexture.SurfaceTexture(int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

SurfaceTexture(Int32, Boolean)

建立一個新的 SurfaceTexture,將影像串流到指定的 OpenGL 材質。

[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

參數

texName
Int32

OpenGL 材質物件名稱(例如透過 glGenTextures 產生)

singleBufferMode
Boolean

SurfaceTexture 是否會處於單一緩衝模式。

屬性

備註

建立一個新的 SurfaceTexture,將影像串流到指定的 OpenGL 材質。

在單一緩衝模式下,應用程式負責序列化對影像內容緩衝區的存取。 每次影像內容要更新時,必須先呼叫該 #releaseTexImage() 方法,影像內容製作者才會取得緩衝區的所有權。 例如,當產生帶有 NDK ANativeWindow_lock 和 ANativeWindow_unlockAndPost 函式的影像內容時, #releaseTexImage() 必須在每個ANativeWindow_lock前呼叫,否則該呼叫將失敗。 在使用 OpenGL ES 製作影像內容時, #releaseTexImage() 必須在每個影格呼叫第一個 OpenGL ES 函式前呼叫。

Java 文件 android.graphics.SurfaceTexture.SurfaceTexture(int, boolean)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

SurfaceTexture(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

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

參數

javaReference
IntPtr

nativeint

IntPtrA 包含一個 Java 原生介面(JNI)物件參考。

transfer
JniHandleOwnership

JniHandleOwnershipA 指示如何處理javaReference

適用於