差分

ナビゲーションに移動 検索に移動

.NET for AndroidでSurfaceViewのANativeWindowを取得する

サイズ変更なし, 2024年4月23日 (火)
編集の要約なし
.NET for Android(旧:Xamarin.Android)で[[Vulkan]]を動かすのにSurfaceViewのANativeWindowを取得する必要がある。.NETだとANativeWindow_fromSurfaceをP/Invokeで簡単に呼び出せるのが便利。
<source lnaglang="csharp">
[DllImport("android", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr ANativeWindow_fromSurface(IntPtr env, IntPtr surface);

案内メニュー