Class VulkanAPI
- Namespace
- Uralstech.UXR.QuestCamera.Vulkan
Exposes the native Vulkan Texture Conversion API.
public static class VulkanAPI
- Inheritance
-
objectVulkanAPI
Fields
RenderCallbackPtr
Static marshalled pointer to OnRenderDone(byte, ulong).
public static readonly nint RenderCallbackPtr
Field Value
- nint
RenderCallbacksRegistry
Registry of render callbacks.
public static readonly ConcurrentDictionary<long, ManagedRenderCallback> RenderCallbacksRegistry
Field Value
- ConcurrentDictionary<long, ManagedRenderCallback>
Methods
AllocateRenderData(ref RenderData)
Allocates native memory of a RenderData struct to use with OnRenderDone(byte, ulong)/FreeRenderData(in nint).
public static nint AllocateRenderData(ref RenderData renderData)
Parameters
renderDataRenderDataThe data to allocate.
Returns
- nint
A pointer to the allocated memory.
Remarks
Allocations are made with UnsafeUtility and Allocator.TempJob, matching de-allocation in OnRenderDone(byte, ulong) and FreeRenderData(in nint).
FreeRenderData(in nint)
Frees the memory of a RenderData struct allocated using AllocateRenderData(ref RenderData).
public static void FreeRenderData(in nint renderDataPtr)
Parameters
renderDataPtrnintThe memory to free.
OnRenderDone(byte, ulong)
Callback for when the event completes.
public static void OnRenderDone(byte success, ulong hardwareBufferId)
Parameters
successbyteWas the event executed successfully?
hardwareBufferIdulongSourceHardwareBufferId, for lookup.
getVulkanRenderEvent()
Returns a pointer to the native rendering function.
public static extern nint getVulkanRenderEvent()
Returns
- nint
releaseHardwareBuffer(nint)
Releases an acquired AHardwareBuffer object.
public static extern void releaseHardwareBuffer(nint acquiredBufferPtr)
Parameters
acquiredBufferPtrnintThe buffer to release.