diff --git a/sources/engine/Xenko.VirtualReality/OpenXR/OpenXRHmd.cs b/sources/engine/Xenko.VirtualReality/OpenXR/OpenXRHmd.cs index ec0084deb7..cd59901ca3 100644 --- a/sources/engine/Xenko.VirtualReality/OpenXR/OpenXRHmd.cs +++ b/sources/engine/Xenko.VirtualReality/OpenXR/OpenXRHmd.cs @@ -80,10 +80,10 @@ public unsafe ulong GetSwapchainImage() { // Get the swapchain image var swapchainIndex = 0u; - var acquireInfo = new SwapchainImageAcquireInfo() { Type = StructureType.TypeSwapchainImageAcquireInfo }; + var acquireInfo = new SwapchainImageAcquireInfo() { Type = StructureType.SwapchainImageAcquireInfo }; CheckResult(Xr.AcquireSwapchainImage(globalSwapchain, in acquireInfo, ref swapchainIndex), "AcquireSwapchainImage"); - var waitInfo = new SwapchainImageWaitInfo(timeout: long.MaxValue) { Type = StructureType.TypeSwapchainImageWaitInfo }; + var waitInfo = new SwapchainImageWaitInfo(timeout: long.MaxValue) { Type = StructureType.SwapchainImageWaitInfo }; swapImageCollected = Xr.WaitSwapchainImage(globalSwapchain, in waitInfo) == Result.Success; return images[swapchainIndex].Image; @@ -108,7 +108,7 @@ private unsafe void Prepare() Xr.EnumerateInstanceExtensionProperties((byte*)null, 0, &propCount, null); ExtensionProperties[] props = new ExtensionProperties[propCount]; - for (int i = 0; i < props.Length; i++) props[i].Type = StructureType.TypeExtensionProperties; + for (int i = 0; i < props.Length; i++) props[i].Type = StructureType.ExtensionProperties; fixed (ExtensionProperties* pptr = &props[0]) Xr.EnumerateInstanceExtensionProperties((byte*)null, propCount, ref propCount, pptr); @@ -272,13 +272,13 @@ public override unsafe void Flush() begunFrame = false; // Release the swapchain image - var releaseInfo = new SwapchainImageReleaseInfo() { Type = StructureType.TypeSwapchainImageReleaseInfo }; + var releaseInfo = new SwapchainImageReleaseInfo() { Type = StructureType.SwapchainImageReleaseInfo }; CheckResult(Xr.ReleaseSwapchainImage(globalSwapchain, in releaseInfo), "ReleaseSwapchainImage"); // https://github.com/dotnet/Silk.NET/blob/b0b31779ce4db9b68922977fa11772b95f506e09/examples/CSharp/OpenGL%20Demos/OpenGL%20VR%20Demo/OpenXR/Renderer.cs#L507 var frameEndInfo = new FrameEndInfo() { - Type = StructureType.TypeFrameEndInfo, + Type = StructureType.FrameEndInfo, DisplayTime = globalFrameState.PredictedDisplayTime, EnvironmentBlendMode = EnvironmentBlendMode.Opaque }; @@ -321,7 +321,7 @@ public override unsafe void UpdatePositions(GameTime gameTime) ActionsSyncInfo actions_sync_info = new ActionsSyncInfo() { - Type = StructureType.TypeActionsSyncInfo, + Type = StructureType.ActionsSyncInfo, CountActiveActionSets = 1, ActiveActionSets = &active_actionsets, }; @@ -334,7 +334,7 @@ public override unsafe void UpdatePositions(GameTime gameTime) // --- Create projection matrices and view matrices for each eye ViewLocateInfo view_locate_info = new ViewLocateInfo() { - Type = StructureType.TypeViewLocateInfo, + Type = StructureType.ViewLocateInfo, ViewConfigurationType = ViewConfigurationType.PrimaryStereo, DisplayTime = globalFrameState.PredictedDisplayTime, Space = globalPlaySpace @@ -342,7 +342,7 @@ public override unsafe void UpdatePositions(GameTime gameTime) ViewState view_state = new ViewState() { - Type = StructureType.TypeViewState + Type = StructureType.ViewState }; uint view_count; @@ -369,7 +369,7 @@ public override unsafe void Draw(GameTime gameTime) // --- Wait for our turn to do head-pose dependent computation and render a frame FrameWaitInfo frame_wait_info = new FrameWaitInfo() { - Type = StructureType.TypeFrameWaitInfo, + Type = StructureType.FrameWaitInfo, }; CheckResult(Xr.WaitFrame(globalSession, in frame_wait_info, ref globalFrameState), "WaitFrame"); @@ -464,17 +464,20 @@ public override unsafe void Enable(GraphicsDevice device, GraphicsDeviceManager Prepare(); SystemProperties system_props = new SystemProperties() { - Type = StructureType.TypeSystemProperties, + Type = StructureType.SystemProperties, }; CheckResult(Xr.GetSystemProperties(Instance, system_id, &system_props), "GetSystemProperties"); - ViewConfigurationView vcv = new ViewConfigurationView() + viewconfig_views = new ViewConfigurationView[32]; + for (int i=0; i(ref viewconfig_views, (int)view_count); @@ -485,7 +488,7 @@ public override unsafe void Enable(GraphicsDevice device, GraphicsDeviceManager GraphicsRequirementsVulkanKHR vulk = new GraphicsRequirementsVulkanKHR() { - Type = StructureType.TypeGraphicsRequirementsVulkanKhr + Type = StructureType.GraphicsRequirementsVulkanKhr }; Silk.NET.Core.PfnVoidFunction func = new Silk.NET.Core.PfnVoidFunction(); @@ -561,7 +564,7 @@ public override unsafe void Enable(GraphicsDevice device, GraphicsDeviceManager Window.GenerateGenericError(null, "OpenXR couldn't find a physical device.\n\nIs an OpenXR runtime running (e.g. SteamVR)?"); SessionCreateInfo session_create_info = new SessionCreateInfo() { - Type = StructureType.TypeSessionCreateInfo, + Type = StructureType.SessionCreateInfo, Next = &graphics_binding_vulkan, SystemId = system_id }; @@ -585,10 +588,10 @@ public override unsafe void Enable(GraphicsDevice device, GraphicsDeviceManager swapchain = new Swapchain(); swapchain_lengths = new uint[1]; SwapchainCreateInfo swapchain_create_info = new SwapchainCreateInfo() { - Type = StructureType.TypeSwapchainCreateInfo, - UsageFlags = SwapchainUsageFlags.SwapchainUsageTransferDstBit | - SwapchainUsageFlags.SwapchainUsageSampledBit | - SwapchainUsageFlags.SwapchainUsageColorAttachmentBit, + Type = StructureType.SwapchainCreateInfo, + UsageFlags = SwapchainUsageFlags.TransferDstBit | + SwapchainUsageFlags.SampledBit | + SwapchainUsageFlags.ColorAttachmentBit, CreateFlags = 0, Format = (long)43, // VK_FORMAT_R8G8B8A8_SRGB = 43 SampleCount = 1, //viewconfig_views[0].RecommendedSwapchainSampleCount, @@ -678,12 +681,12 @@ public override unsafe void Enable(GraphicsDevice device, GraphicsDeviceManager // Do not allocate these every frame to save some resources views = new View[view_count]; //(XrView*)malloc(sizeof(XrView) * view_count); for (int i = 0; i < view_count; i++) - views[i].Type = StructureType.TypeView; + views[i].Type = StructureType.View; projection_views = new CompositionLayerProjectionView[view_count]; //(XrCompositionLayerProjectionView*)malloc(sizeof(XrCompositionLayerProjectionView) * view_count); for (int i = 0; i < view_count; i++) { - projection_views[i].Type = StructureType.TypeCompositionLayerProjectionView; //XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW; + projection_views[i].Type = StructureType.CompositionLayerProjectionView; //XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW; projection_views[i].SubImage.Swapchain = swapchain; projection_views[i].SubImage.ImageArrayIndex = 0; projection_views[i].SubImage.ImageRect.Offset.X = (renderSize.Width * i) / 2; @@ -744,7 +747,7 @@ public override unsafe void Enable(GraphicsDevice device, GraphicsDeviceManager // --- Begin session */ SessionBeginInfo session_begin_info = new SessionBeginInfo() { - Type = StructureType.TypeSessionBeginInfo, + Type = StructureType.SessionBeginInfo, PrimaryViewConfigurationType = view_type }; @@ -752,7 +755,7 @@ public override unsafe void Enable(GraphicsDevice device, GraphicsDeviceManager SessionActionSetsAttachInfo actionset_attach_info = new SessionActionSetsAttachInfo() { - Type = StructureType.TypeSessionActionSetsAttachInfo, + Type = StructureType.SessionActionSetsAttachInfo, CountActionSets = 1, ActionSets = &gameplay_actionset }; @@ -760,7 +763,7 @@ public override unsafe void Enable(GraphicsDevice device, GraphicsDeviceManager CheckResult(Xr.AttachSessionActionSets(session, &actionset_attach_info), "AttachSessionActionSets"); // figure out what interaction profile we are using, and determine if it has a touchpad/thumbstick or both - handProfileState.Type = StructureType.TypeInteractionProfileState; + handProfileState.Type = StructureType.InteractionProfileState; Xr.StringToPath(Instance, "/user/hand/left", ref leftHandPath); } diff --git a/sources/engine/Xenko.VirtualReality/Xenko.VirtualReality.csproj b/sources/engine/Xenko.VirtualReality/Xenko.VirtualReality.csproj index 05091fcc14..e6043cd697 100644 --- a/sources/engine/Xenko.VirtualReality/Xenko.VirtualReality.csproj +++ b/sources/engine/Xenko.VirtualReality/Xenko.VirtualReality.csproj @@ -44,7 +44,7 @@ {84deb606-77ed-49cd-9aed-d2b13c1f5a1e} Xenko.Input - + diff --git a/sources/shared/SharedAssemblyInfo.cs b/sources/shared/SharedAssemblyInfo.cs index ce298015aa..26da4c9b0e 100644 --- a/sources/shared/SharedAssemblyInfo.cs +++ b/sources/shared/SharedAssemblyInfo.cs @@ -30,7 +30,7 @@ internal class XenkoVersion /// /// This version will be shown in the editor and actually is the version. Can be changed without triggering weird NuGet behavior. /// - public const string VersionToShowInEditor = "4.13.8"; + public const string VersionToShowInEditor = "4.13.9"; /// 1 /// The current assembly version as text, currently same as . diff --git a/sources/tools/Xenko.Importer.Assimp/MeshConverter.cs b/sources/tools/Xenko.Importer.Assimp/MeshConverter.cs index 7776b7462f..5514efedd7 100644 --- a/sources/tools/Xenko.Importer.Assimp/MeshConverter.cs +++ b/sources/tools/Xenko.Importer.Assimp/MeshConverter.cs @@ -146,7 +146,7 @@ public unsafe AnimationInfo ConvertAnimation(string inputFilename, string output return ProcessAnimations(scene); } - public unsafe Skeleton ConvertSkeleton(string inputFilename, string outputFilename) + public unsafe Xenko.Rendering.Skeleton ConvertSkeleton(string inputFilename, string outputFilename) { uint importFlags = 0; var postProcessFlags = PostProcessSteps.None; @@ -229,7 +229,7 @@ private unsafe Model ConvertAssimpScene(Scene* scene) return modelData; } - private unsafe Skeleton ProcessSkeleton(Scene* scene) + private unsafe Xenko.Rendering.Skeleton ProcessSkeleton(Scene* scene) { var nodeNames = new Dictionary(); GenerateNodeNames(scene, nodeNames); @@ -238,7 +238,7 @@ private unsafe Skeleton ProcessSkeleton(Scene* scene) var meshIndexToNodeIndex = new Dictionary>(); RegisterNodes(scene->MRootNode, -1, nodeNames, meshIndexToNodeIndex); - return new Skeleton + return new Xenko.Rendering.Skeleton { Nodes = nodes.ToArray() }; diff --git a/sources/tools/Xenko.Importer.Assimp/Xenko.Importer.Assimp.csproj b/sources/tools/Xenko.Importer.Assimp/Xenko.Importer.Assimp.csproj index 75d10d54c9..c7cb827f02 100644 --- a/sources/tools/Xenko.Importer.Assimp/Xenko.Importer.Assimp.csproj +++ b/sources/tools/Xenko.Importer.Assimp/Xenko.Importer.Assimp.csproj @@ -13,7 +13,7 @@ <_SettingsFiles Remove="Analysis\**" /> - +