version 2.4.0

This commit is contained in:
Sean Lu(呂祥榮)
2024-07-03 14:58:53 +08:00
parent 7f2a459592
commit 3dd72f5f56
162 changed files with 23632 additions and 27154 deletions

View File

@@ -19,7 +19,7 @@ namespace VIVE.OpenXR
Desc = "Support the HTC foveation extension.",
Company = "HTC",
DocumentationLink = "..\\Documentation",
OpenxrExtensionStrings = "XR_HTC_foveation",
OpenxrExtensionStrings = kOpenxrExtensionString,
Version = "1.0.0",
BuildTargetGroups = new[] { BuildTargetGroup.Android },
FeatureId = featureId
@@ -27,6 +27,11 @@ namespace VIVE.OpenXR
#endif
public class ViveFoveation : OpenXRFeature
{
const string LOG_TAG = "VIVE.OpenXR.ViveFoveation";
void DEBUG(string msg) { Debug.Log(LOG_TAG + " " + msg); }
void WARNING(string msg) { Debug.LogWarning(LOG_TAG + " " + msg); }
void ERROR(string msg) { Debug.LogError(LOG_TAG + " " + msg); }
/// <summary>
/// Flag bits for XrFoveationDynamicFlagsHTC
/// </summary>
@@ -39,6 +44,31 @@ namespace VIVE.OpenXR
/// </summary>
public const string featureId = "vive.openxr.feature.foveation";
/// <summary>
/// OpenXR specification <see href="https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_HTC_foveation">12.90. XR_HTC_foveation</see>.
/// </summary>
public const string kOpenxrExtensionString = "XR_HTC_foveation";
#region OpenXR Life Cycle
/// <summary>
/// Called when <see href="https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#xrCreateInstance">xrCreateInstance</see> is done.
/// </summary>
/// <param name="xrInstance">The created instance.</param>
/// <returns>True for valid <see cref="XrInstance">XrInstance</see></returns>
protected override bool OnInstanceCreate(ulong xrInstance)
{
if (!OpenXRRuntime.IsExtensionEnabled(kOpenxrExtensionString))
{
WARNING("OnInstanceCreate() " + kOpenxrExtensionString + " is NOT enabled.");
return false;
}
DEBUG("OnInstanceCreate() " + xrInstance);
return true;
}
#endregion
protected override IntPtr HookGetInstanceProcAddr(IntPtr func)
{
Debug.Log("EXT: registering our own xrGetInstanceProcAddr");