Struct UnityXRTextureData
Container for different ways of representing texture data.
- If the format (#UnityXRRenderTextureDesc::colorFormat or #UnityXRRenderTextureDesc::depthFormat) is a 'Reference' format, referenceTextureId must be set.
- If the format is kUnityXRRenderTextureFormatSoftReferenceMSAA, both fields are used. Otherwise, nativePtr is used.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.API
Assembly: Unity.XR.OpenXR.dll
Syntax
public struct UnityXRTextureData
Fields
nativePtr
@brief Native texture ID if you've allocated it yourself. The texture ID varies by graphics API. For example:
- GL: texture name that comes from glGenTextures
- DX11: ID3D11Texture2D*
- Vulkan: vkImage*
You can pass in #kUnityXRRenderTextureIdDontCare and have Unity allocate one for you.
Declaration
public IntPtr nativePtr
Field Value
Type | Description |
---|---|
IntPtr |
referenceTextureId
Texture ID to share color / depth with in the case of reference color / depth format.
Declaration
public uint referenceTextureId
Field Value
Type | Description |
---|---|
uint |