Class STCaptureSessionNative
- Namespace
- Uralstech.UXR.QuestCamera.SurfaceTextureCapture
Class to interact with the native graphics plugin for SurfaceTexture rendering.
public static class STCaptureSessionNative
- Inheritance
-
objectSTCaptureSessionNative
Fields
NativeSetupCallbacksQueue
Event queues for renderer setup events, mapped to the IDs of the unity textures they are for.
public static readonly ConcurrentDictionary<uint, STCaptureSessionNative.NativeSetupCallbackType> NativeSetupCallbacksQueue
Field Value
- ConcurrentDictionary<uint, STCaptureSessionNative.NativeSetupCallbackType>
NativeUpdateCallbacksQueue
Event queues for update events, mapped to the IDs of the native textures they are for.
public static readonly ConcurrentDictionary<uint, ConcurrentQueue<STCaptureSessionNative.AdditionalUpdateCallbackData>> NativeUpdateCallbacksQueue
Field Value
- ConcurrentDictionary<uint, ConcurrentQueue<STCaptureSessionNative.AdditionalUpdateCallbackData>>
Methods
DeregisterNativeUpdateCallbacks(uint)
Deregisters a native update queue for a texture and disposes allocated data.
public static void DeregisterNativeUpdateCallbacks(uint textureId)
Parameters
textureIduintThe ID of the native texture to deregister updates of.
GetRenderEventFunction()
Gets the pointer to the native render event handler.
public static extern nint GetRenderEventFunction()
Returns
- nint
NativeSetupCallback(bool, bool, uint, uint, bool)
The actual callback for native renderer setup events.
public static void NativeSetupCallback(bool glIsClean, bool sessionCallSent, uint unityTextureId, uint textureId, bool idIsValid)
Parameters
glIsCleanboolWas the GL context successfully cleaned up in this call?
sessionCallSentboolWas the call to start the capture session sent to the Kotlin class?
unityTextureIduintThe unity texture associated with the event.
textureIduintThe native texture created by the call, may be invalid.
idIsValidboolIs
textureIda valid texture?
Remarks
This will dequeue from NativeSetupCallbacksQueue and process the callbacks.
NativeUpdateCallback(uint, bool)
The actual callback for native rendering updates.
public static void NativeUpdateCallback(uint textureId, bool success)
Parameters
textureIduintThe ID of the native texture which was updated.
successboolIf the operation was successful.
Remarks
This will dequeue from NativeUpdateCallbacksQueue and process the callback data.